Table function execution model for Java
For table functions written in Java™ and using PARAMETER STYLE DB2GENERAL, it is important to understand what happens at each point during the processing of a statement by the database manager.
The following table details this information for a typical table function. Covered are both the NO FINAL CALL and the FINAL CALL cases, assuming SCRATCHPAD in both cases.
| Point in scan time | NO FINAL CALL LANGUAGE JAVA SCRATCHPAD |
FINAL CALL LANGUAGE JAVA SCRATCHPAD |
|---|---|---|
| Before the first OPEN for the table function |
|
|
| At each OPEN of the table function |
|
|
| At each FETCH for a new row of table function data |
|
|
| At each CLOSE of the table function |
|
|
| After the last CLOSE of the table function |
|
|
Note:
The term "UDF method" refers to the Java class method that implements the UDF. This is the method identified in the EXTERNAL NAME clause of the CREATE FUNCTION statement.