Vertica documentation is moving! Use our new documentation site at https://docs.rocketsoftware.com/bundle/vertica_12.0/page/index.html

com.vertica.sdk.TransformFunctionPhase Class Reference

Interface to provide compile-time information for a single phase of a multi-phase user-defined transform function.

Collaboration diagram for com.vertica.sdk.TransformFunctionPhase:

Public Member Functions
abstract TransformFunction createTransformFunction (ServerInterface srvInterface)
abstract void getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnTypes)
boolean isPrepass ()
void setPrepass ()

Detailed Description

Interface to provide compile-time information for a single phase of a multi-phase user-defined transform function.

Note that even though this class shares some methods with TransformFunctionFactory, it is explicitly not a subclass (because it is incorrect to implement a getPrototype() method for this class).

Member Function Documentation

abstract TransformFunction com.vertica.sdk.TransformFunctionPhase.createTransformFunction(ServerInterface srvInterface)

pure virtual Called when Vertica needs a new TransformFunction object to process this phase of a multi-phase UDT.

Note More than one object may be instantiated per query.

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica

Returns a TransformFunction object which implements the UDx API described by this metadata.

abstract void com.vertica.sdk.TransformFunctionPhase.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnTypes)

pure virtual Function to tell Vertica what the return types (and length/precision if necessary) and partition-by, order-by of this phase 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

  • srvInterface: a ServerInterface object used to communicate with Vertica
  • argTypes: Provides the data types of arguments that this phase was called with, along with partition and order information. This may be used to modify the return types accordingly.
  • returnTypes: User code must fill in the names and data types returned by this phase, along with the partition-by and order-by column information (if any).