I've created a custom udf that is registered but when I try to run select do_protect('abc@test.com','Test_EMAIL'); I am getting following error:
io.trino.spi.TrinoException: Exact implementation of do_protect do not match expected java types
Here is my Trino udf. I want to pass two string (VARCHAR) parameters.
@ScalarFunction("do_protect")
@Description("Return encrypted string")
@SqlType(StandardTypes.VARCHAR)
public String protectUDF(@SqlType(StandardTypes.VARCHAR) Slice slice1, @SqlType(StandardTypes.VARCHAR) Slice slice2) throws PrivaceraException {
logger.info("protectUDF get called...");
String valueForEncrypt = slice1.toString();
logger.info("AS :: valueForEncrypt :: "+valueForEncrypt);
String schemeForEncrypt = slice2.toString();
logger.info("AS :: schemeForEncrypt :: "+schemeForEncrypt);
}