C++ SDK Documentation  11.0.0
Vertica::FilterFactory Class Referenceabstract

Produces and initializes UDFilters to transform input data before parsing. More...

Inheritance diagram for Vertica::FilterFactory:
Inheritance graph
Collaboration diagram for Vertica::FilterFactory:
Collaboration graph

Public Member Functions

UDXFactory::UDXType getUDXFactoryType () __override__
 
virtual void plan (ServerInterface &srvInterface, PlanContext &planCtxt)
 
virtual UDFilterprepare (ServerInterface &srvInterface, PlanContext &planCtxt)=0
 

Detailed Description

Produces and initializes UDFilters to transform input data before parsing.

Note that FilterFactories are singletons. Subclasses should be stateless, with no fields containing data, just methods. plan() and prepare() methods must never modify any global variables or state; they may only modify the variables that they are given as arguments. (If global state must be modified, use SourceIterator.)

Factories should be registered using the RegisterFactory() macro, defined in Vertica.h.

Member Function Documentation

virtual void Vertica::FilterFactory::plan ( ServerInterface &  srvInterface,
PlanContext planCtxt 
)
inlinevirtual

Execute any planning logic required at query plan time. This method is run once per query, during query initialization. Its job is to perform parameter validation, and to modify the set of nodes that the COPY statement will run on (through srvInterface).

plan() runs exactly once per query, on the initiator node. If it throws an exception, the query will not proceed; it will be aborted prior to distributing the query to the other nodes and running prepare().

Parameters
srvInterfaceInterface to server operations and functionality, including (not-per-column) parameter lookup
planCtxtContext for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan().
virtual UDFilter* Vertica::FilterFactory::prepare ( ServerInterface &  srvInterface,
PlanContext planCtxt 
)
pure virtual

Initialize a UDFilter. This function will be called on each node, prior to the Load operator starting to execute.

'planData' contains the same data that was placed there by the plan() static method.

Parameters
srvInterfaceInterface to server operations and functionality, including (not-per-column) parameter lookup
planCtxtContext for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan().
Returns
UDFilter instance to use for this query