A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pdb::ScanUserSetBase< OutputClass > Class Template Reference

#include <ScanUserSetBase.h>

+ Inheritance diagram for pdb::ScanUserSetBase< OutputClass >:
+ Collaboration diagram for pdb::ScanUserSetBase< OutputClass >:

Public Member Functions

 ScanUserSetBase ()=default
 
 ScanUserSetBase (std::string dbName, std::string setName)
 
 ~ScanUserSetBase ()
 
void setUpAndCopyFrom (void *target, void *source) const override
 
void deleteObject (void *deleteMe) override
 
size_t getSize (void *forMe) override
 
ComputeSourcePtr getComputeSource (TupleSpec &schema, ComputePlan &plan) override
 
void setIterator (PageCircularBufferIteratorPtr iterator)
 
void setProxy (DataProxyPtr proxy)
 
void setBatchSize (int batchSize) override
 
int getBatchSize ()
 
void setOutput (std::string dbName, std::string setName) override
 
void setDatabaseName (std::string dbName)
 
void setSetName (std::string setName)
 
std::string getDatabaseName () override
 
std::string getSetName () override
 
std::string getComputationType () override
 
ComputationTypeID getComputationTypeID () override
 
std::string toTCAPString (std::vector< InputTupleSetSpecifier > &inputTupleSets, int computationLabel, std::string &outputTupleSetName, std::vector< std::string > &outputColumnNames, std::string &addedOutputColumnName) override
 
std::string toTCAPString (std::string inputTupleSetName, std::vector< std::string > &inputColumnNames, std::vector< std::string > &inputColumnsToApply, int computationLabel, std::string &outputTupleSetName, std::vector< std::string > &outputColumnNames, std::string &addedOutputColumnName)
 
int getNumInputs () override
 
std::string getIthInputType (int i) override
 
std::string getOutputType () override
 
bool needsMaterializeOutput () override
 
- Public Member Functions inherited from pdb::Computation
virtual void extractLambdas (std::map< std::string, GenericLambdaObjectPtr > &returnVal)
 
virtual ComputeSinkPtr getComputeSink (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan)
 
virtual ComputeSinkPtr getComputeSink (TupleSpec &consumeMe, TupleSpec &whichAttsToOpOn, TupleSpec &projection, ComputePlan &plan)
 
virtual SinkMergerPtr getSinkMerger (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan)
 
virtual SinkMergerPtr getSinkMerger (TupleSpec &consumeMe, TupleSpec &whichAttsToOpOn, TupleSpec &projection, ComputePlan &plan)
 
virtual SinkShufflerPtr getSinkShuffler (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan)
 JiaNote: add below interface for shuffling multiple join map sinks for hash partitioned join. More...
 
virtual SinkShufflerPtr getSinkShuffler (TupleSpec &consumeMe, TupleSpec &whichAttsToOpOn, TupleSpec &projection, ComputePlan &plan)
 
bool hasInput ()
 
Handle< Computation > & getIthInput (int i) const
 
int getNumConsumers ()
 
void setNumConsumers (int numConsumers)
 
bool setInput (Handle< Computation > toMe)
 
bool setInput (int whichSlot, Handle< Computation > toMe)
 
bool isTraversed ()
 
void setTraversed (bool traversed)
 
std::string getOutputTupleSetName ()
 
void setOutputTupleSetName (std::string outputTupleSetName)
 
std::string getOutputColumnToApply ()
 
void setOutputColumnToApply (std::string outputColumnToApply)
 
virtual bool isUsingCombiner ()
 
virtual void setUsingCombiner (bool useCombinerOrNot)
 
void setAllocatorPolicy (AllocatorPolicy myPolicy)
 
void setObjectPolicy (ObjectPolicy myPolicy)
 
AllocatorPolicy getAllocatorPolicy ()
 
ObjectPolicy getObjectPolicy ()
 
virtual void setCollectAsMap (bool collectAsMapOrNot)
 
virtual bool isCollectAsMap ()
 
virtual int getNumNodesToCollect ()
 
virtual void setNumNodesToCollect (int numNodesToCollect)
 
- Public Member Functions inherited from pdb::Object
void setVTablePtr (void *setToMe)
 
void * getVTablePtr ()
 

Protected Attributes

PageCircularBufferIteratorPtr iterator = nullptr
 
DataProxyPtr proxy = nullptr
 
String dbName
 
String setName
 
int batchSize {}
 
String outputType = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from pdb::Object
static void * operator new (size_t sz, const std::nothrow_t &tag)
 
static void * operator new (size_t sz)
 
static void operator delete (void *me)
 
static void * operator new (std::size_t count, void *ptr)
 

Detailed Description

template<class OutputClass>
class pdb::ScanUserSetBase< OutputClass >

Definition at line 35 of file ScanUserSetBase.h.

Constructor & Destructor Documentation

template<class OutputClass>
pdb::ScanUserSetBase< OutputClass >::ScanUserSetBase ( )
default

This constructor is for constructing builtin object

template<class OutputClass>
pdb::ScanUserSetBase< OutputClass >::ScanUserSetBase ( std::string  dbName,
std::string  setName 
)
inline

User should only use following constructor

Parameters
dbName
setName

Definition at line 49 of file ScanUserSetBase.h.

template<class OutputClass>
pdb::ScanUserSetBase< OutputClass >::~ScanUserSetBase ( )
inline

Definition at line 56 of file ScanUserSetBase.h.

Member Function Documentation

template<class OutputClass>
void pdb::ScanUserSetBase< OutputClass >::deleteObject ( void *  deleteMe)
inlineoverridevirtual

Reimplemented from pdb::Object.

Definition at line 78 of file ScanUserSetBase.h.

template<class OutputClass>
int pdb::ScanUserSetBase< OutputClass >::getBatchSize ( )
inline

Definition at line 147 of file ScanUserSetBase.h.

template<class OutputClass>
std::string pdb::ScanUserSetBase< OutputClass >::getComputationType ( )
inlineoverridevirtual

Implements pdb::Computation.

Definition at line 172 of file ScanUserSetBase.h.

+ Here is the caller graph for this function:

template<class OutputClass>
ComputationTypeID pdb::ScanUserSetBase< OutputClass >::getComputationTypeID ( )
inlineoverridevirtual

to return the type if of this computation

Returns

Implements pdb::Computation.

Definition at line 180 of file ScanUserSetBase.h.

template<class OutputClass>
ComputeSourcePtr pdb::ScanUserSetBase< OutputClass >::getComputeSource ( TupleSpec produceMe,
ComputePlan plan 
)
inlineoverridevirtual

If this particular computation can be used as a compute source in a pipeline, this method will return the compute source object associated with the computation...

In the general case, this method accepts the logical plan that this guy is a part of, as well as the actual TupleSpec that this guy is supposed to produce, and then returns a pointer to a ComputeSource object that can actually produce TupleSet objects corresponding to that particular TupleSpec

Reimplemented from pdb::Computation.

Definition at line 86 of file ScanUserSetBase.h.

template<class OutputClass>
std::string pdb::ScanUserSetBase< OutputClass >::getDatabaseName ( )
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 164 of file ScanUserSetBase.h.

template<class OutputClass>
std::string pdb::ScanUserSetBase< OutputClass >::getIthInputType ( int  i)
inlineoverridevirtual

gets the name of the i^th input type...

Parameters
i
Returns

Implements pdb::Computation.

Definition at line 266 of file ScanUserSetBase.h.

template<class OutputClass>
int pdb::ScanUserSetBase< OutputClass >::getNumInputs ( )
inlineoverridevirtual

get the number of inputs to this query type

Returns

Implements pdb::Computation.

Definition at line 262 of file ScanUserSetBase.h.

template<class OutputClass>
std::string pdb::ScanUserSetBase< OutputClass >::getOutputType ( )
inlineoverridevirtual

gets the output type of this query as a string

Returns

Implements pdb::Computation.

Definition at line 270 of file ScanUserSetBase.h.

template<class OutputClass>
std::string pdb::ScanUserSetBase< OutputClass >::getSetName ( )
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 168 of file ScanUserSetBase.h.

template<class OutputClass>
size_t pdb::ScanUserSetBase< OutputClass >::getSize ( void *  forMe)
inlineoverridevirtual

Reimplemented from pdb::Object.

Definition at line 82 of file ScanUserSetBase.h.

template<class OutputClass>
bool pdb::ScanUserSetBase< OutputClass >::needsMaterializeOutput ( )
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 277 of file ScanUserSetBase.h.

template<class OutputClass>
void pdb::ScanUserSetBase< OutputClass >::setBatchSize ( int  batchSize)
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 143 of file ScanUserSetBase.h.

template<class OutputClass>
void pdb::ScanUserSetBase< OutputClass >::setDatabaseName ( std::string  dbName)
inline

Definition at line 156 of file ScanUserSetBase.h.

template<class OutputClass>
void pdb::ScanUserSetBase< OutputClass >::setIterator ( PageCircularBufferIteratorPtr  iterator)
inline

Be careful here that we put PageCircularBufferIteratorPtr and DataProxyPtr in a pdb object

Parameters
iterator

Definition at line 135 of file ScanUserSetBase.h.

template<class OutputClass>
void pdb::ScanUserSetBase< OutputClass >::setOutput ( std::string  dbName,
std::string  setName 
)
inlineoverridevirtual

set user set for output when necessary (e.g. results need to be materialized) by default it do nothing, subclasses shall override this function to handle the case when results need to be materialized.

Reimplemented from pdb::Computation.

Definition at line 151 of file ScanUserSetBase.h.

template<class OutputClass>
void pdb::ScanUserSetBase< OutputClass >::setProxy ( DataProxyPtr  proxy)
inline

Definition at line 139 of file ScanUserSetBase.h.

template<class OutputClass>
void pdb::ScanUserSetBase< OutputClass >::setSetName ( std::string  setName)
inline

Definition at line 160 of file ScanUserSetBase.h.

template<class OutputClass>
void pdb::ScanUserSetBase< OutputClass >::setUpAndCopyFrom ( void *  target,
void *  source 
) const
inlineoverridevirtual

Normally these would be defined by the ENABLE_DEEP_COPY macro, but because Array is the one variable-sized type that we allow, we need to manually override these methods

Reimplemented from pdb::Object.

Definition at line 65 of file ScanUserSetBase.h.

template<class OutputClass>
std::string pdb::ScanUserSetBase< OutputClass >::toTCAPString ( std::vector< InputTupleSetSpecifier > &  inputTupleSets,
int  computationLabel,
std::string &  outputTupleSetName,
std::vector< std::string > &  outputColumnNames,
std::string &  addedOutputColumnName 
)
inlineoverridevirtual

below function implements the interface for parsing computation into a TCAP string

Parameters
inputTupleSets
computationLabel
outputTupleSetName
outputColumnNames
addedOutputColumnName
Returns

Implements pdb::Computation.

Definition at line 193 of file ScanUserSetBase.h.

+ Here is the caller graph for this function:

template<class OutputClass>
std::string pdb::ScanUserSetBase< OutputClass >::toTCAPString ( std::string  inputTupleSetName,
std::vector< std::string > &  inputColumnNames,
std::vector< std::string > &  inputColumnsToApply,
int  computationLabel,
std::string &  outputTupleSetName,
std::vector< std::string > &  outputColumnNames,
std::string &  addedOutputColumnName 
)
inline

Below function returns a TCAP string for this Computation

Parameters
inputTupleSetName
inputColumnNames
inputColumnsToApply
computationLabel
outputTupleSetName
outputColumnNames
addedOutputColumnName
Returns

Definition at line 223 of file ScanUserSetBase.h.

Member Data Documentation

template<class OutputClass>
int pdb::ScanUserSetBase< OutputClass >::batchSize {}
protected

Definition at line 294 of file ScanUserSetBase.h.

template<class OutputClass>
String pdb::ScanUserSetBase< OutputClass >::dbName
protected

Definition at line 290 of file ScanUserSetBase.h.

template<class OutputClass>
PageCircularBufferIteratorPtr pdb::ScanUserSetBase< OutputClass >::iterator = nullptr
protected

Be careful here that we put PageCircularBufferIteratorPtr and DataProxyPtr in a pdb object.

Definition at line 286 of file ScanUserSetBase.h.

template<class OutputClass>
String pdb::ScanUserSetBase< OutputClass >::outputType = ""
protected

Definition at line 296 of file ScanUserSetBase.h.

template<class OutputClass>
DataProxyPtr pdb::ScanUserSetBase< OutputClass >::proxy = nullptr
protected

Definition at line 288 of file ScanUserSetBase.h.

template<class OutputClass>
String pdb::ScanUserSetBase< OutputClass >::setName
protected

Definition at line 292 of file ScanUserSetBase.h.


The documentation for this class was generated from the following file: