C++ SDK Documentation  9.0
Vertica::MultiPhaseTransformFunctionFactory Class Referenceabstract

Interface for declaring parameters and return types for, and instantiating, an associated multi-phase transform function. This class is similar to, but not a subclass of, TransformFunctionFactory. More...

Inheritance diagram for Vertica::MultiPhaseTransformFunctionFactory:
Inheritance graph
Collaboration diagram for Vertica::MultiPhaseTransformFunctionFactory:
Collaboration graph

Public Types

enum  UDXType {
  FUNCTION, TRANSFORM, ANALYTIC, MULTI_TRANSFORM,
  AGGREGATE, LOAD_SOURCE, LOAD_FILTER, LOAD_PARSER,
  FILESYSTEM, TYPE, CURSOR_TRANSFORM
}
 

Public Member Functions

virtual void getParameterType (ServerInterface &srvInterface, SizedColumnTypes &parameterTypes)
 
virtual void getPerInstanceResources (ServerInterface &srvInterface, VResources &res)
 
virtual void getPerInstanceResources (ServerInterface &srvInterface, VResources &res, const SizedColumnTypes &inputTypes)
 
virtual void getPhases (ServerInterface &srvInterface, std::vector< TransformFunctionPhase * > &phases)=0
 
virtual void getPrototype (ServerInterface &srvInterface, ColumnTypes &argTypes, ColumnTypes &returnType)
 
virtual void getReturnType (ServerInterface &srvInterface, const SizedColumnTypes &argTypes, SizedColumnTypes &returnType)
 

Protected Member Functions

virtual UDXType getUDXFactoryType ()
 

Protected Attributes

Oid libOid
 
std::string sqlName
 

Detailed Description

Interface for declaring parameters and return types for, and instantiating, an associated multi-phase transform function. This class is similar to, but not a subclass of, TransformFunctionFactory.

A multi-phase transform function is made up of TransformFunctionPhase instances. For each phase of your transform, extend this class (not TransformFunction). In getPhases(), return a vector of instances of those classes. Semantically, getPhases() replaces TransformFunctionFactory.createTransformFunction().

Member Enumeration Documentation

The type of UDX instance this factory produces

Member Function Documentation

virtual void Vertica::UDXFactory::getParameterType ( ServerInterface srvInterface,
SizedColumnTypes parameterTypes 
)
inlinevirtualinherited

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.

Reimplemented in Vertica::ParserFactory.

virtual void Vertica::UDXFactory::getPerInstanceResources ( ServerInterface srvInterface,
VResources res 
)
inlinevirtualinherited

Set the resource required for each instance of the UDX Object subclass. Users should override only one of the following methods.

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

Reimplemented in Vertica::UDLFactory.

virtual void Vertica::UDXFactory::getPerInstanceResources ( ServerInterface srvInterface,
VResources res,
const SizedColumnTypes inputTypes 
)
inlinevirtualinherited

Set the resource required for each instance of the UDX Object subclass. Users should override only one of the following methods.

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 UDT was called with

Reimplemented in Vertica::UDLFactory.

virtual void Vertica::MultiPhaseTransformFunctionFactory::getPhases ( ServerInterface srvInterface,
std::vector< TransformFunctionPhase * > &  phases 
)
pure virtual

Called when Vertica needs a new TransformFunctionPhase pipeline to process a multi-phase UDTF function call. Vertica invokes the phases in order; collectively they behave like a TransformFunction.

Parameters
srvInterfacea ServerInterface object used to communicate with Ver tica
phasesoutput TransformFunctionPhase objects
Note
More than one object may be instantiated per query.
virtual void Vertica::MultiPhaseTransformFunctionFactory::getPrototype ( ServerInterface srvInterface,
ColumnTypes argTypes,
ColumnTypes returnType 
)
inlinevirtual

Provides the argument and return types of the UDX

Implements Vertica::UDXFactory.

virtual void Vertica::MultiPhaseTransformFunctionFactory::getReturnType ( ServerInterface srvInterface,
const SizedColumnTypes argTypes,
SizedColumnTypes returnType 
)
inlinevirtual

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/Timestamp 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
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.

Implements Vertica::UDXFactory.

virtual UDXType Vertica::MultiPhaseTransformFunctionFactory::getUDXFactoryType ( )
inlineprotectedvirtual
Returns
the object type internally used by Vertica

Implements Vertica::UDXFactory.