Inheritance diagram for Vertica::SourceFactory:

Public Member Functions | |
| UDXFactory::UDXType | getUDXFactoryType () |
| virtual bool | isSourceApportionable () |
| virtual void | plan (ServerInterface &srvInterface, NodeSpecifyingPlanContext &planCtxt) |
| virtual SourceIterator * | prepare (ServerInterface &srvInterface, NodeSpecifyingPlanContext &planCtxt)=0 |
| virtual std::vector< UDSource * > | prepareUDSources (ServerInterface &srvInterface, NodeSpecifyingPlanContext &planCtxt)=0 |
When implementing the factories for a UDSource, you have two options:
Factories should be registered using the RegisterFactory() macro, defined in Vertica.h.
| virtual void Vertica::SourceFactory::plan | ( | ServerInterface & | srvInterface, | |
| NodeSpecifyingPlanContext & | planCtxt | |||
| ) | [inline, virtual] |
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.
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().
| srvInterface | Interface to server operations and functionality, including (not-per-column) parameter lookup | |
| planCtxt | Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan(). Also provides functionality for specifying which nodes this query will run on. |
Reimplemented from Vertica::IterativeSourceFactory.
| virtual SourceIterator* Vertica::IterativeSourceFactory::prepare | ( | ServerInterface & | srvInterface, | |
| NodeSpecifyingPlanContext & | planCtxt | |||
| ) | [pure virtual, inherited] |
Prepare this SourceFactory to start creating sources. This function will be called on each node, prior to the Load operator starting to execute and prior to any other virtual functions on this class being called.
'planData' contains the same data that was placed there by the plan() static method.
If necessary, it is safe for this method to store any of the argument references as local fields on this instance. All will persist for the duration of the query.
| virtual std::vector<UDSource*> Vertica::SourceFactory::prepareUDSources | ( | ServerInterface & | srvInterface, | |
| NodeSpecifyingPlanContext & | planCtxt | |||
| ) | [pure virtual] |
Create UDSources. This function will be called on each node, prior to the Load operator starting to execute and prior to any other virtual functions on this class being called.
'planData' contains the same data that was placed there by the plan() static method.
If necessary, it is safe for this method to store any of the argument references as local fields on this instance. All will persist for the duration of the query.
Unlike the standard SourceFactory, this method directly instantiates all of its UDSources, and returns a vector of them. This requires that all UDSources be resident in memory for the duration of the query, which is fine in the common case but which may not be acceptable for some resource-intensive UDSources.
| srvInterface | Interface to server operations and functionality, including (not-per-column) parameter lookup | |
| planCtxt | Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan(). Also provides functionality for determining which nodes this query is running on. |