initialize()

Call the initialize() method before passing the first row of data to a UDX. The most common operations performed by initialize() are to validate data types for a VARARGS UDX and to initialize variables.

For a UDA, the initialize method is called prior to the first row of data being passed to the accumulate() method but is not called prior to the first row of data being passed to the merge() or finalResult() methods.

Example

function initialize()
    for i,type in pairs(ARGTYPE) do
        if type != TYPE_STRING and type != TYPE_UTF8STRING then
            error("This function only accepts STRING arguments!",0)
        end
    end
end