The Java UDF in this example is defined with a JSON type parameter. Therefore, if you pass BSON data to this function, the binary JSON data is converted to a CLOB type and mapped to java.sql.Clob.
REPLACE FUNCTION BSON_FUNC1 (json_param JSON(100) CHARACTER SET LATIN) RETURNS INTEGER SPECIFIC bson_func1 LANGUAGE JAVA NO SQL NO EXTERNAL DATA PARAMETER STYLE JAVA NOT DETERMINISTIC CALLED ON NULL INPUT EXTERNAL NAME 'JSON_JAR:JSONUDF.bson_func1(java.sql.Clob) returns int'; public static int jbson_func1(java.sql.Clob bson_clob) { return 0; }