AnalyticFunctionFactory class
The AnalyticFunctionFactory
class tells Vertica metadata about your UDAnF: its number of parameters and their data types, as well as the data type of its return value. It also instantiates a subclass of AnalyticFunction
.
Your AnalyticFunctionFactory
subclass must implement the following methods:
-
getPrototype()
describes the input parameters and output value of your function. You set these values by calling functions on twoColumnTypes
objects that are passed to your method. -
createAnalyticFunction()
supplies an instance of yourAnalyticFunction
that Vertica can call to process a UDAnF function call. -
getReturnType()
provides details about your function's output. This method is where you set the width of the output value if your function returns a variable-width value (such as VARCHAR) or the precision of the output value if it has a settable precision (such as TIMESTAMP).
API
The AnalyticFunctionFactory API provides the following methods for extension by subclasses:
The AnalyticFunctionFactory API provides the following methods for extension by subclasses: