Interface UserDefinedFunction2

    • 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.