public interface ScalarUdf
SamzaSqlUdfMethod
in the UDF class should match the number and type of fields
used while invoking this UDF in SQL statement.
Say for e.g. User creates a UDF class with signature int execute(int var1, String var2). It can be used in a SQL query
select myudf(id, name) from profile
In the above query, Profile should contain fields named 'id' of INTEGER/NUMBER type and 'name' of type VARCHAR/CHARACTERModifier and Type | Method and Description |
---|---|
void |
init(Config udfConfig)
Udfs can implement this method to perform any initialization that they may need.
|
void init(Config udfConfig)
udfConfig
- Config specific to the udf.