Java SDK Documentation  23.4.0
com.vertica.sdk.UDXFactory Class Referenceabstract
Inheritance diagram for com.vertica.sdk.UDXFactory:
Inheritance graph
Collaboration diagram for com.vertica.sdk.UDXFactory:
Collaboration graph

Classes

enum  UDXType
 

Public Member Functions

void getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
 
void getPerInstanceResources (ServerInterface srvInterface, VResources res)
 
void getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
 
abstract void getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
 
abstract void getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
 
abstract UDXType getUDXFactoryType ()
 

Protected Attributes

long libOid
 
String sqlName
 

Detailed Description

Parent class for UDx factories; not intended for direct use by applications.

Member Function Documentation

void com.vertica.sdk.UDXFactory.getParameterType ( ServerInterface  srvInterface,
SizedColumnTypes  parameterTypes 
)

Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.

Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
parameterTypesSizedColumnTypes describing the parameters
void com.vertica.sdk.UDXFactory.getPerInstanceResources ( ServerInterface  srvInterface,
VResources  res 
)

Set the resource required for each instance of the UDX Object subclass

Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
resa VResources object used to tell Vertica what resources are needed by the UDX

Referenced by com.vertica.sdk.UDXFactory.getPerInstanceResources().

void com.vertica.sdk.UDXFactory.getPerInstanceResources ( ServerInterface  srvInterface,
VResources  res,
SizedColumnTypes  argTypes 
)

Set the resource required for each instance of the UDX Object subclass

Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
resa VResources object used to tell Vertica what resources are needed by the UDX
argTypesProvides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
abstract void com.vertica.sdk.UDXFactory.getPrototype ( ServerInterface  srvInterface,
ColumnTypes  argTypes,
ColumnTypes  returnType 
)
pure virtual

Provides the argument and return types of the UDX

Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
argTypesthe types of the arguments
returnTypethe type(s) of the return

Implemented in com.vertica.sdk.UDLFactory, and com.vertica.sdk.MultiPhaseTransformFunctionFactory.

Referenced by com.vertica.sdk.ScalarFunctionFactory.getReturnType().

abstract void com.vertica.sdk.UDXFactory.getReturnType ( ServerInterface  srvInterface,
SizedColumnTypes  argTypes,
SizedColumnTypes  returnType 
) throws UdfException
pure virtual

Function to tell Vertica what the return types (and length/precision if necessary) of this UDX are.

For CHAR/VARCHAR types, specify the max length,

For NUMERIC types, specify the precision and scale.

For Time types (with or without time zone), specify the precision, -1 means unspecified/don't care

For IntervalYM/IntervalDS types, specify the precision and range

For all other types, no length/precision specification needed

Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
argTypesProvides the data types of arguments that this UDT was called with. This may be used to modify the return types accordingly.
returnTypeUser code must fill in the names and data types returned by the UDT.

Implemented in com.vertica.sdk.ScalarFunctionFactory, com.vertica.sdk.UDLFactory, and com.vertica.sdk.MultiPhaseTransformFunctionFactory.

abstract UDXType com.vertica.sdk.UDXFactory.getUDXFactoryType ( )
pure virtual

User subclasses should use the appropriate subclass of UDXFactory and not override this method on their own.

Returns
the type of UDX Object instance this factory returns.

Implemented in com.vertica.sdk.ScalarFunctionFactory, com.vertica.sdk.IterativeSourceFactory, com.vertica.sdk.TransformFunctionFactory, com.vertica.sdk.AnalyticFunctionFactory, com.vertica.sdk.FilterFactory, com.vertica.sdk.MultiPhaseTransformFunctionFactory, and com.vertica.sdk.ParserFactory.