The CREATE FUNCTION and REPLACE FUNCTION statements provide the EXTERNAL NAME clause for specifying the identifier of the registered JAR or ZIP file, and the class and method name in the JAR or ZIP file that implements the function.
Consider the following CREATE FUNCTION statement:
CREATE FUNCTION factorial (x INTEGER) RETURNS INTEGER LANGUAGE JAVA NO SQL PARAMETER STYLE JAVA RETURNS NULL ON NULL INPUT EXTERNAL NAME 'JarUDF:UDFExample.fact';
where:
THIS part of the EXTERNAL NAME clause … | Specifies the … |
---|---|
JarUDF | identifier of the registered JAR file that was provided to the SQLJ.INSTALL_JAR procedure. |
UDFExample | name of the class in the registered JAR file that implements the Java UDF. |
fact | method name in the specified class that Vantage invokes when the UDF is specified in an SQL statement. |