com.vertica.sdk.ScalarFunction Class Reference

Interface for User Defined Scalar Function, the actual code to process a block of data. More...

Inheritance diagram for com.vertica.sdk.ScalarFunction:

com.vertica.sdk.UDXObject List of all members.

Public Member Functions

void destroy (ServerInterface srvInterface, SizedColumnTypes argTypes)
abstract void processBlock (ServerInterface srvInterface, BlockReader arg_reader, BlockWriter res_writer) throws UdfException, DestroyInvocation
void setup (ServerInterface srvInterface, SizedColumnTypes argTypes)

Protected Types

 FunctionT
enum  InterfaceType { FunctionT, IndexListFunctionT }

Protected Member Functions

InterfaceType getInterfaceType ()

Detailed Description

Interface for User Defined Scalar Function, the actual code to process a block of data.


Member Function Documentation

void com.vertica.sdk.UDXObject.destroy ( ServerInterface  srvInterface,
SizedColumnTypes  argTypes 
) [inherited]

Perform per instance destruction. This function may throw errors

abstract void com.vertica.sdk.ScalarFunction.processBlock ( ServerInterface  srvInterface,
BlockReader  arg_reader,
BlockWriter  res_writer 
) throws UdfException, DestroyInvocation [pure virtual]

Invoke a user defined function on a set of rows. As the name suggests, a batch of rows are passed in for every invocation to amortize performance.

Parameters:
srvInterface a ServerInterface object used to communicate with Vertica
arg_reader input rows
res_writer output location
Note:
  • This methods may be invoked by different threads at different times, and by a different thread than the constructor.
  • The order in which the function sees rows is not guaranteed.
  • To report error to Vertica, throw a UdfException object

void com.vertica.sdk.UDXObject.setup ( ServerInterface  srvInterface,
SizedColumnTypes  argTypes 
) [inherited]

Perform per instance initialization. This function may throw errors.