com.vertica.sdk.ScalarFunctionFactory Class Reference

Inheritance diagram for com.vertica.sdk.ScalarFunctionFactory:

Collaboration diagram for com.vertica.sdk.ScalarFunctionFactory:

Classes
enum strictness
enum volatility
Public Member Functions
abstract ScalarFunction createScalarFunction (ServerInterface srvInterface)
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)
void getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
UDXType getUDXFactoryType ()
Public Attributes
strictness strict
volatility vol
Protected Attributes
long libOid
String sqlName

Detailed Description

Interface for declaring parameters and return types for, and instantiating, an associated ScalarFunction.

Member Function Documentation

abstract ScalarFunction com.vertica.sdk.ScalarFunctionFactory.createScalarFunction(ServerInterface srvInterface)

pure virtual Note More than one object may be instantiated per query.

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica

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

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

inherited 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

  • srvInterface: a ServerInterface object used to communicate with Vertica
  • parameterTypes: SizedColumnTypes describing the parameters
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res)

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

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica
  • res: a 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)

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

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica
  • res: a VResources object used to tell Vertica what resources are needed by the UDX
  • argTypes: Provides 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 inherited Provides the argument and return types of the UDX

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica
  • argTypes: the types of the arguments
  • returnType: the type(s) of the return

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

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

void com.vertica.sdk.ScalarFunctionFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException

virtual

For scalar functions, this function needs to be overridden only if the return type needs length/precision specification.

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica
  • argTypes: The data type of the return value defined by processBlock()
  • returnType: The size of the data returned by processBlock()

Implements com.vertica.sdk.UDXFactory.

UDXType com.vertica.sdk.ScalarFunctionFactory.getUDXFactoryType()

virtual

Returns the object type internally used by Vertica

Implements com.vertica.sdk.UDXFactory.

Member Data Documentation

volatility com.vertica.sdk.ScalarFunctionFactory.vol

Strictness and Volatility settings that the UDSF programmer can set Defaults are VOLATILE and CALLED_ON_NULL_INPUT