Package io.lenses.sql.udf
Interface UserDefinedFunction2
-
- All Superinterfaces:
UserDefinedFunction
public interface UserDefinedFunction2 extends UserDefinedFunction
Interface for User Defined Functions taking two arguments.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Valueevaluate(Value arg1, Value arg2)Evaluates this UDF for the given arguments.DataTypetypeMapping(DataType arg1Type, DataType arg2Type)Defines a mapping from input to output types.-
Methods inherited from interface io.lenses.sql.udf.UserDefinedFunction
name, owner, version
-
-
-
-
Method Detail
-
typeMapping
DataType typeMapping(DataType arg1Type, DataType arg2Type) throws UdfException
Defines a mapping from input to output types.- Parameters:
arg1Type- The data type of the first argument.arg2Type- The data type of the second argument.- Returns:
- The resulting data type.
- Throws:
UdfException- if one or more of the given data types are not supported by this UDF.
-
evaluate
Value evaluate(Value arg1, Value arg2) throws UdfException
Evaluates this UDF for the given arguments.- Parameters:
arg1- The first argument.arg2- The second argument.- Returns:
- The result of the evaluation.
- Throws:
UdfException- if the evaluation failed for some reason.
-
-