Vertica::FilterFactory Class Reference
Produces and initializes UDFilters to transform input data before parsing.
Inheritance diagram for Vertica::FilterFactory:
Collaboration diagram for Vertica::FilterFactory:
| Public Types | |
|---|---|
| enum | UDXType { SCALAR = 1, TRANSFORM = 2, ANALYTIC = 3, MULTI_TRANSFORM = 4, AGGREGATE = 5, LOAD_SOURCE = 6, LOAD_FILTER = 7, LOAD_PARSER = 8, FILESYSTEM = 9, TYPE = 10, CURSOR_TRANSFORM = 11, KEYMANAGER = 12 } |
| Public Member Functions | |
|---|---|
| virtual void | getParameterType (ServerInterface &srvInterface, SizedColumnTypes meterTypes) |
| virtual void | getPerInstanceResources (ServerInterface &srvInterface, VResources &res) override |
| virtual void | getPerInstanceResources (ServerInterface &srvInterface, VResources &res, const SizedColumnTypes &inputTypes) override |
| UDXFactory::UDXType | getUDXFactoryType () override |
| virtual void | plan (ServerInterface &srvInterface, PlanContext &planCtxt) |
| virtual UDFilter * | prepare (ServerInterface &srvInterface, PlanContext &planCtxt)=0 |
| Protected Attributes | |
|---|---|
| Oid | libOid |
| std::string | sqlName |
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 Enumeration Documentation
| enum Vertica::UDXFactory::UDXType |
|---|
inherited The type of UDX instance this factory produces
Member Function Documentation
virtual void Vertica::UDXFactory::getParameterType(ServerInterface & srvInterface, SizedColumnTypes & parameterTypes)
inlinevirtualinherited
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Reimplemented in Vertica::ParserFactory.
virtual void Vertica::UDLFactory::getPerInstanceResources(ServerInterface & srvInterface, VResources & res)
inlinevirtualinherited
Set the resource required for each instance of the UDX Object subclass. Users should override only one of the following methods.
Parameters
srvInterface: a ServerInterface object used to communicate with Verticares: a VResources object used to tell Vertica what resources are needed by the UDX
Reimplemented from Vertica::UDXFactory.
Referenced by Vertica::UDLFactory::getPerInstanceResources().
virtual void Vertica::UDLFactory::getPerInstanceResources(ServerInterface & srvInterface, VResources & res, const SizedColumnTypes & inputTypes)
inlinevirtualinherited
Set the resource required for each instance of the UDX Object subclass. Users should override only one of the following methods.
Parameters
srvInterface: a ServerInterface object used to communicate with Verticares: a VResources object used to tell Vertica what resources are needed by the UDXargTypes: Provides the data types of arguments that this UDT was called with
Reimplemented from Vertica::UDXFactory.
UDXFactory::UDXType Vertica::FilterFactory::getUDXFactoryType()
inlinevirtual
Returns the type of UDX Object instance this factory returns.
Note User subclasses should use the appropriate subclass of UDXFactory and not override this method on their own.
Implements Vertica::UDXFactory.
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
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookupplanCtxt: Context 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
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookupplanCtxt: Context 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