TransformFunction and TransformFunctionFactory C++ Interface

This section describes information that is specific to the C++ 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:

virtual void setup(ServerInterface &srvInterface, 
		const SizedColumnTypes &argTypes);
				
virtual void processPartition(ServerInterface &srvInterface, 
		PartitionReader &input_reader, PartitionWriter &output_writer)=0;
				
virtual void destroy(ServerInterface &srvInterface, 
		const SizedColumnTypes &argTypes);
		

TransformFunctionFactory API

The API provides the following methods for extension by subclasses:

virtual TransformFunction * 
	createTransformFunction (ServerInterface &srvInterface)=0;
				
virtual void getPrototype(ServerInterface &srvInterface, 
			ColumnTypes &argTypes, ColumnTypes &returnType)=0;
				
virtual void getReturnType(ServerInterface &srvInterface, 
			const SizedColumnTypes &argTypes, 
			SizedColumnTypes &returnType)=0;
				
virtual void getParameterType(ServerInterface &srvInterface, 
			SizedColumnTypes &parameterTypes);
				

MultiPhaseTransformFunctionFactory API

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

virtual void getPhases(ServerInterface &srvInterface, 
		std::vector< TransformFunctionPhase * > &phases)=0;
				

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