Java SDK Documentation  8.1
com.vertica.sdk.AnalyticFunction Class Referenceabstract

Interface for User-Defined Analytic Function (UDAnF). A UDAnF operates on rows of data and returns rows of data, not necessarily 1:1. More...

Inheritance diagram for com.vertica.sdk.AnalyticFunction:
Inheritance graph
Collaboration diagram for com.vertica.sdk.AnalyticFunction:
Collaboration graph

Public Member Functions

void cancel (ServerInterface srvInterface)
 
void destroy (ServerInterface srvInterface, SizedColumnTypes argTypes)
 
void destroy (ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
 
boolean isCanceled ()
 
abstract void processPartition (ServerInterface srvInterface, AnalyticPartitionReader input_reader, AnalyticPartitionWriter output_writer) throws UdfException, DestroyInvocation
 
void setup (ServerInterface srvInterface, SizedColumnTypes argTypes)
 

Detailed Description

Interface for User-Defined Analytic Function (UDAnF). A UDAnF operates on rows of data and returns rows of data, not necessarily 1:1.

An AnalyticFunction must have an associated AnalyticFunctionFactory.

Member Function Documentation

void com.vertica.sdk.UDXObjectCancelable.cancel ( ServerInterface  srvInterface)
inherited

This function is invoked from a different thread when the execution is canceled This baseclass cancel should be called in any override.

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

Perform per instance destruction. This function may throw errors

Referenced by com.vertica.sdk.UDXObject.destroy().

void com.vertica.sdk.UDXObject.destroy ( ServerInterface  srvInterface,
SizedColumnTypes  argTypes,
SessionParamWriterMap  udSessionParams 
)
inherited

Perform per instance destruction and write session parameters to be used by UDxs that are invoked after this one returns. This function may throw errors

boolean com.vertica.sdk.UDXObjectCancelable.isCanceled ( )
inherited

Returns true if execution was canceled.

abstract void com.vertica.sdk.AnalyticFunction.processPartition ( ServerInterface  srvInterface,
AnalyticPartitionReader  input_reader,
AnalyticPartitionWriter  output_writer 
) throws UdfException, DestroyInvocation
abstract

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

Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
input_readerinput rows
output_writeroutput location
void com.vertica.sdk.UDXObject.setup ( ServerInterface  srvInterface,
SizedColumnTypes  argTypes 
)
inherited

Perform per instance initialization. This function may throw errors.