TransformFunction and TransformFunctionFactory Java Interface

This section describes information that is specific to the Java API. See UDTF Class Overview for general information about implementing the TransformFunction and TransformFunctionFactory classes.

TransformFunction API

The API provides the following methods for extension by subclasses:

void setup(ServerInterface srvInterface, SizedColumnTypes argTypes);

abstract void processPartition(ServerInterface srvInterface, 
		PartitionReader input_reader, PartitionWriter input_writer) 
	throws UdfException, DestroyInvocation;
				
void destroy(ServerInterface srvInterface, SizedColumnTypes argTypes);
		

TransformFunctionFactory API

The API provides the following methods for extension by subclasses:

abstract TransformFunction createTransformFunction(ServerInterface srvInterface);

abstract void getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType);
				
abstract void getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, 
		SizedColumnTypes returnType) throws UdfException;
				
void getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes);
				

MultiPhaseTransformFunctionFactory API

The MultiPhaseTransformFunctionFactory class extends TransformFunctionFactory The API provides the following additional methods for extension by subclasses:

abstract void getPhases(ServerInterface srvInterface, 
		Vector< TransformFunctionPhase > phases);
				

If using this factory you must also extend TransformFunctionPhase. See the SDK reference documentation.