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::MultiSelectionCompBase< OutputClass, InputClass > Class Template Referenceabstract

#include <MultiSelectionCompBase.h>

+ Inheritance diagram for pdb::MultiSelectionCompBase< OutputClass, InputClass >:
+ Collaboration diagram for pdb::MultiSelectionCompBase< OutputClass, InputClass >:

Public Member Functions

virtual pdb::Lambda< bool > getSelection (pdb::Handle< InputClass > checkMe)=0
 
virtual pdb::Lambda
< pdb::Vector< pdb::Handle
< OutputClass > > > 
getProjection (pdb::Handle< InputClass > checkMe)=0
 
void extractLambdas (std::map< std::string, GenericLambdaObjectPtr > &returnVal) override
 
std::string getComputationType () override
 
ComputationTypeID getComputationTypeID () override
 
std::string getIthInputType (int i) override
 
int getNumInputs () override
 
std::string getOutputType () 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, std::vector< std::string > &childrenLambdaNames, int computationLabel, std::string &outputTupleSetName, std::vector< std::string > &outputColumnNames, std::string &addedOutputColumnName, std::string &myLambdaName)
 
void setOutput (std::string dbName, std::string setName) override
 
void setBatchSize (int batchSize) override
 
std::string getDatabaseName () override
 
std::string getSetName () override
 
ComputeSourcePtr getComputeSource (TupleSpec &outputScheme, ComputePlan &plan) override
 
ComputeSinkPtr getComputeSink (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan) override
 
bool needsMaterializeOutput () override
 
Handle< ScanUserSet
< OutputClass > > & 
getOutputSetScanner ()
 
- Public Member Functions inherited from pdb::Computation
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 ()
 
virtual void setUpAndCopyFrom (void *target, void *source) const
 
virtual void deleteObject (void *deleteMe)
 
virtual size_t getSize (void *ofMe)
 

Private Attributes

bool materializeSelectionOut = false
 
Handle< ScanUserSet
< OutputClass > > 
outputSetScanner = nullptr
 

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 InputClass>
class pdb::MultiSelectionCompBase< OutputClass, InputClass >

TODO add proper description

Template Parameters
OutputClass
InputClass

Definition at line 36 of file MultiSelectionCompBase.h.

Member Function Documentation

template<class OutputClass , class InputClass >
void pdb::MultiSelectionCompBase< OutputClass, InputClass >::extractLambdas ( std::map< std::string, GenericLambdaObjectPtr > &  returnVal)
inlineoverridevirtual

calls getProjection and getSelection to extract the lambdas

Parameters
returnVal

Reimplemented from pdb::Computation.

Definition at line 58 of file MultiSelectionCompBase.h.

+ Here is the call graph for this function:

template<class OutputClass , class InputClass >
std::string pdb::MultiSelectionCompBase< OutputClass, InputClass >::getComputationType ( )
inlineoverridevirtual

this is a MultiSelection computation

Returns

Implements pdb::Computation.

Definition at line 71 of file MultiSelectionCompBase.h.

+ Here is the caller graph for this function:

template<class OutputClass , class InputClass >
ComputationTypeID pdb::MultiSelectionCompBase< OutputClass, InputClass >::getComputationTypeID ( )
inlineoverridevirtual

to return the type if of this computation

Returns

Implements pdb::Computation.

Definition at line 79 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
ComputeSinkPtr pdb::MultiSelectionCompBase< OutputClass, InputClass >::getComputeSink ( TupleSpec consumeMe,
TupleSpec projection,
ComputePlan plan 
)
inlineoverridevirtual

likewise, if this particular computation can be used as a compute sink in a pipeline, this method will return the compute sink object associated with the computation. It requires the TupleSpec that should be processed, as well as the projection of that TupleSpec that will be put into the sink

Reimplemented from pdb::Computation.

Definition at line 302 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
ComputeSourcePtr pdb::MultiSelectionCompBase< OutputClass, InputClass >::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 291 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
std::string pdb::MultiSelectionCompBase< OutputClass, InputClass >::getDatabaseName ( )
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 281 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
std::string pdb::MultiSelectionCompBase< OutputClass, InputClass >::getIthInputType ( int  i)
inlineoverridevirtual

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

Parameters
i
Returns

Implements pdb::Computation.

Definition at line 88 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
int pdb::MultiSelectionCompBase< OutputClass, InputClass >::getNumInputs ( )
inlineoverridevirtual

get the number of inputs to this query type

Returns

Implements pdb::Computation.

Definition at line 100 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
Handle<ScanUserSet<OutputClass> >& pdb::MultiSelectionCompBase< OutputClass, InputClass >::getOutputSetScanner ( )
inline

Definition at line 316 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
std::string pdb::MultiSelectionCompBase< OutputClass, InputClass >::getOutputType ( )
inlineoverridevirtual

return the output type

Returns

Implements pdb::Computation.

Definition at line 108 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
virtual pdb::Lambda<pdb::Vector<pdb::Handle<OutputClass> > > pdb::MultiSelectionCompBase< OutputClass, InputClass >::getProjection ( pdb::Handle< InputClass >  checkMe)
pure virtual

the computation returned by this method is called to produce output tuples from this method

Parameters
checkMe
Returns

Implemented in pdb::MultiSelectionComp< OutputClass, InputClass >.

+ Here is the caller graph for this function:

template<class OutputClass , class InputClass >
virtual pdb::Lambda<bool> pdb::MultiSelectionCompBase< OutputClass, InputClass >::getSelection ( pdb::Handle< InputClass >  checkMe)
pure virtual

the computation returned by this method is called to see if a data item should be returned in the output set

Parameters
checkMe
Returns

Implemented in pdb::MultiSelectionComp< OutputClass, InputClass >.

+ Here is the caller graph for this function:

template<class OutputClass , class InputClass >
std::string pdb::MultiSelectionCompBase< OutputClass, InputClass >::getSetName ( )
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 286 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
bool pdb::MultiSelectionCompBase< OutputClass, InputClass >::needsMaterializeOutput ( )
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 312 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
void pdb::MultiSelectionCompBase< OutputClass, InputClass >::setBatchSize ( int  batchSize)
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 274 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
void pdb::MultiSelectionCompBase< OutputClass, InputClass >::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 267 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
std::string pdb::MultiSelectionCompBase< OutputClass, InputClass >::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 121 of file MultiSelectionCompBase.h.

+ Here is the call graph for this function:

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

Definition at line 146 of file MultiSelectionCompBase.h.

+ Here is the call graph for this function:

Member Data Documentation

template<class OutputClass , class InputClass >
bool pdb::MultiSelectionCompBase< OutputClass, InputClass >::materializeSelectionOut = false
private

Definition at line 321 of file MultiSelectionCompBase.h.

template<class OutputClass , class InputClass >
Handle<ScanUserSet<OutputClass> > pdb::MultiSelectionCompBase< OutputClass, InputClass >::outputSetScanner = nullptr
private

Definition at line 322 of file MultiSelectionCompBase.h.


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