getResult()

The getResult() method is called only during the compile step of the UDF and it is used to indicate the data type that is returned by the evaluate() method.

The getResult() method must return one of the standard data types that are documented in Table 1 in getArgs().

When the getResult method returns varchar(any) or numeric(any), the calculateSize method is invoked at runtime to dynamically determine the size of the result.

Here are a few examples of the getResult() method for a UDF.
function getResult()
return integer

end

function getResult()
return varchar(255)

end

function getResult()
return numeric(18,4)

end