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::JoinCompBase< Out, In1, In2, Rest > Class Template Referenceabstract

#include <JoinCompBase.h>

+ Inheritance diagram for pdb::JoinCompBase< Out, In1, In2, Rest >:
+ Collaboration diagram for pdb::JoinCompBase< Out, In1, In2, Rest >:

Public Member Functions

virtual ~JoinCompBase ()
 
void setJoinType (JoinType joinType)
 
JoinType getJoinType ()
 
void setNumPartitions (int numPartitions)
 
int getNumPartitions ()
 
void setNumNodes (int numNodes)
 
int getNumNodes ()
 
void setPartitionId (size_t myPartitionId)
 
size_t getPartitionId ()
 
void setIterator (PageCircularBufferIteratorPtr iterator)
 
void setProxy (DataProxyPtr proxy)
 
void setBatchSize (int batchSize) override
 
int getBatchSize ()
 
MultiInputsBasegetMultiInputsBase ()
 
void setMultiInputsBaseToNull ()
 
void analyzeInputSets (std::vector< std::string > &inputNames)
 
virtual Lambda< bool > getSelection (Handle< In1 > in1, Handle< In2 > in2, Handle< Rest >...otherArgs)=0
 
virtual Lambda< Handle< Out > > getProjection (Handle< In1 > in1, Handle< In2 > in2, Handle< Rest >...otherArgs)=0
 
void extractLambdas (std::map< std::string, GenericLambdaObjectPtr > &returnVal) override
 
std::string getOutputType () override
 
int getNumInputs () final
 
template<typename First , typename... Others>
std::enable_if< sizeof...(Others)==0,
std::string >::type 
getIthInputType (int i)
 
template<typename First , typename... Others>
std::enable_if< sizeof...(Others)!=0,
std::string >::type 
getIthInputType (int i)
 
std::string getIthInputType (int i) final
 
SinkMergerPtr getSinkMerger (TupleSpec &consumeMe, TupleSpec &attsToOpOn, TupleSpec &projection, ComputePlan &plan) override
 
SinkShufflerPtr getSinkShuffler (TupleSpec &consumeMe, TupleSpec &attsToOpOn, TupleSpec &projection, ComputePlan &plan) override
 
ComputeSinkPtr getComputeSink (TupleSpec &consumeMe, TupleSpec &attsToOpOn, TupleSpec &projection, ComputePlan &plan) override
 
ComputeSourcePtr getComputeSource (TupleSpec &outputScheme, ComputePlan &plan) 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
 
ComputeExecutorPtr getExecutor (bool needToSwapAtts, TupleSpec &hashedInputSchema, TupleSpec &pipelinedInputSchema, TupleSpec &pipelinedAttsToOperateOn, TupleSpec &pipelinedAttsToIncludeInOutput, ComputeInfoPtr arg) override
 
ComputeExecutorPtr getExecutor (bool needToSwapAtts, TupleSpec &hashedInputSchema, TupleSpec &pipelinedInputSchema, TupleSpec &pipelinedAttsToOperateOn, TupleSpec &pipelinedAttsToIncludeInOutput) override
 
- Public Member Functions inherited from pdb::Computation
virtual ComputeSinkPtr getComputeSink (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan)
 
virtual SinkMergerPtr getSinkMerger (TupleSpec &consumeMe, 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...
 
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 void setOutput (std::string dbName, std::string setName)
 
virtual std::string getDatabaseName ()
 
virtual std::string getSetName ()
 
virtual bool needsMaterializeOutput ()
 
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

MultiInputsBasemultiInputsBase = nullptr
 
JoinType joinType = BroadcastJoin
 
int numPartitions = 0
 
int numNodes = 0
 
size_t myPartitionId = 0
 
PageCircularBufferIteratorPtr iterator = nullptr
 
DataProxyPtr proxy = nullptr
 
int batchSize = -1
 

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<typename Out, typename In1, typename In2, typename... Rest>
class pdb::JoinCompBase< Out, In1, In2, Rest >

Definition at line 59 of file JoinCompBase.h.

Constructor & Destructor Documentation

template<typename Out, typename In1, typename In2, typename... Rest>
virtual pdb::JoinCompBase< Out, In1, In2, Rest >::~JoinCompBase ( )
inlinevirtual

Definition at line 88 of file JoinCompBase.h.

Member Function Documentation

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::analyzeInputSets ( std::vector< std::string > &  inputNames)
inline

Definition at line 172 of file JoinCompBase.h.

+ Here is the caller graph for this function:

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::extractLambdas ( std::map< std::string, GenericLambdaObjectPtr > &  returnVal)
inlineoverridevirtual

This is implemented by the actual computation object... as the name implies, it is used to extract the lambdas from the computation

Reimplemented from pdb::Computation.

Definition at line 209 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
int pdb::JoinCompBase< Out, In1, In2, Rest >::getBatchSize ( )
inline

Definition at line 154 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
std::string pdb::JoinCompBase< Out, In1, In2, Rest >::getComputationType ( )
inlineoverridevirtual

Implements pdb::Computation.

Definition at line 490 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
ComputationTypeID pdb::JoinCompBase< Out, In1, In2, Rest >::getComputationTypeID ( )
inlineoverridevirtual

Used to return the type if of this computation

Returns

Reimplemented from pdb::AbstractJoinComp.

Definition at line 495 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
ComputeSinkPtr pdb::JoinCompBase< Out, In1, In2, Rest >::getComputeSink ( TupleSpec consumeMe,
TupleSpec attsToOpOn,
TupleSpec projection,
ComputePlan plan 
)
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 334 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
ComputeSourcePtr pdb::JoinCompBase< Out, In1, In2, Rest >::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 385 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
ComputeExecutorPtr pdb::JoinCompBase< Out, In1, In2, Rest >::getExecutor ( bool  needToSwapAtts,
TupleSpec hashedInputSchema,
TupleSpec pipelinedInputSchema,
TupleSpec pipelinedAttsToOperateOn,
TupleSpec pipelinedAttsToIncludeInOutput,
ComputeInfoPtr  arg 
)
inlineoverridevirtual

Gets an execute that can run a scan join...

Parameters
needToSwapAtts- is true if the atts that are currently stored in the hash table need to come SECOND in the output tuple sets...
hashedInputSchema- hashedInputSchema tells us the schema for the attributes that are currently stored in the hash table...
pipelinedInputSchema- tells us the schema for the attributes that will be coming through the pipeline...
pipelinedAttsToOperateOn- is the identity of the hash attribute...
pipelinedAttsToIncludeInOutput- tells us the set of attributes that are coming through the pipeline that we actually have to write to the output stream
arg- parameters that are sent into a pipeline when it is built
Returns
- the executor

Implements pdb::AbstractJoinComp.

Definition at line 598 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
ComputeExecutorPtr pdb::JoinCompBase< Out, In1, In2, Rest >::getExecutor ( bool  needToSwapAtts,
TupleSpec hashedInputSchema,
TupleSpec pipelinedInputSchema,
TupleSpec pipelinedAttsToOperateOn,
TupleSpec pipelinedAttsToIncludeInOutput 
)
inlineoverridevirtual

Gets an execute that can run a scan join...

Parameters
needToSwapAtts- is true if the atts that are currently stored in the hash table need to come SECOND in the output tuple sets...
hashedInputSchema- hashedInputSchema tells us the schema for the attributes that are currently stored in the hash table...
pipelinedInputSchema- tells us the schema for the attributes that will be coming through the pipeline...
pipelinedAttsToOperateOn- is the identity of the hash attribute...
pipelinedAttsToIncludeInOutput- tells us the set of attributes that are coming through the pipeline that we actually have to write to the output stream
arg- parameters that are sent into a pipeline when it is built
Returns
- the executor

Implements pdb::AbstractJoinComp.

Definition at line 645 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
template<typename First , typename... Others>
std::enable_if<sizeof...(Others) == 0, std::string>::type pdb::JoinCompBase< Out, In1, In2, Rest >::getIthInputType ( int  i)
inlinevirtual

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

Parameters
i
Returns

Implements pdb::Computation.

Definition at line 229 of file JoinCompBase.h.

+ Here is the caller graph for this function:

template<typename Out, typename In1, typename In2, typename... Rest>
template<typename First , typename... Others>
std::enable_if<sizeof...(Others) != 0, std::string>::type pdb::JoinCompBase< Out, In1, In2, Rest >::getIthInputType ( int  i)
inlinevirtual

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

Parameters
i
Returns

Implements pdb::Computation.

Definition at line 240 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
std::string pdb::JoinCompBase< Out, In1, In2, Rest >::getIthInputType ( int  i)
inlinefinalvirtual

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

Parameters
i
Returns

Implements pdb::Computation.

Definition at line 249 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
JoinType pdb::JoinCompBase< Out, In1, In2, Rest >::getJoinType ( )
inline

Definition at line 102 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
MultiInputsBase* pdb::JoinCompBase< Out, In1, In2, Rest >::getMultiInputsBase ( )
inline

Definition at line 158 of file JoinCompBase.h.

+ Here is the caller graph for this function:

template<typename Out, typename In1, typename In2, typename... Rest>
int pdb::JoinCompBase< Out, In1, In2, Rest >::getNumInputs ( )
inlinefinalvirtual

get the number of inputs to this query type

Returns

Implements pdb::Computation.

Definition at line 223 of file JoinCompBase.h.

+ Here is the caller graph for this function:

template<typename Out, typename In1, typename In2, typename... Rest>
int pdb::JoinCompBase< Out, In1, In2, Rest >::getNumNodes ( )
inline

Definition at line 122 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
int pdb::JoinCompBase< Out, In1, In2, Rest >::getNumPartitions ( )
inline

Definition at line 112 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
std::string pdb::JoinCompBase< Out, In1, In2, Rest >::getOutputType ( )
inlineoverridevirtual

gets the output type of this query as a string

Returns

Implements pdb::Computation.

Definition at line 218 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
size_t pdb::JoinCompBase< Out, In1, In2, Rest >::getPartitionId ( )
inline

Definition at line 133 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
virtual Lambda<Handle<Out> > pdb::JoinCompBase< Out, In1, In2, Rest >::getProjection ( Handle< In1 >  in1,
Handle< In2 >  in2,
Handle< Rest >...  otherArgs 
)
pure virtual
template<typename Out, typename In1, typename In2, typename... Rest>
virtual Lambda<bool> pdb::JoinCompBase< Out, In1, In2, Rest >::getSelection ( Handle< In1 >  in1,
Handle< In2 >  in2,
Handle< Rest >...  otherArgs 
)
pure virtual
template<typename Out, typename In1, typename In2, typename... Rest>
SinkMergerPtr pdb::JoinCompBase< Out, In1, In2, Rest >::getSinkMerger ( TupleSpec consumeMe,
TupleSpec attsToOpOn,
TupleSpec projection,
ComputePlan plan 
)
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 256 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
SinkShufflerPtr pdb::JoinCompBase< Out, In1, In2, Rest >::getSinkShuffler ( TupleSpec consumeMe,
TupleSpec attsToOpOn,
TupleSpec projection,
ComputePlan plan 
)
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 296 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::setBatchSize ( int  batchSize)
inlineoverridevirtual

Reimplemented from pdb::Computation.

Definition at line 149 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::setIterator ( PageCircularBufferIteratorPtr  iterator)
inline

Definition at line 139 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::setJoinType ( JoinType  joinType)
inline

Definition at line 97 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::setMultiInputsBaseToNull ( )
inline

Definition at line 165 of file JoinCompBase.h.

+ Here is the caller graph for this function:

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::setNumNodes ( int  numNodes)
inline

Definition at line 117 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::setNumPartitions ( int  numPartitions)
inline

Definition at line 107 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::setPartitionId ( size_t  myPartitionId)
inline

Definition at line 127 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
void pdb::JoinCompBase< Out, In1, In2, Rest >::setProxy ( DataProxyPtr  proxy)
inline

Definition at line 144 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
std::string pdb::JoinCompBase< Out, In1, In2, Rest >::toTCAPString ( std::vector< InputTupleSetSpecifier > &  inputTupleSets,
int  computationLabel,
std::string &  outputTupleSetName,
std::vector< std::string > &  outputColumnNames,
std::string &  addedOutputColumnName 
)
inlineoverridevirtual

Implements pdb::Computation.

Definition at line 500 of file JoinCompBase.h.

Member Data Documentation

template<typename Out, typename In1, typename In2, typename... Rest>
int pdb::JoinCompBase< Out, In1, In2, Rest >::batchSize = -1
private

Definition at line 84 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
PageCircularBufferIteratorPtr pdb::JoinCompBase< Out, In1, In2, Rest >::iterator = nullptr
private

Definition at line 78 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
JoinType pdb::JoinCompBase< Out, In1, In2, Rest >::joinType = BroadcastJoin
private

Definition at line 65 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
MultiInputsBase* pdb::JoinCompBase< Out, In1, In2, Rest >::multiInputsBase = nullptr
private

Definition at line 62 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
size_t pdb::JoinCompBase< Out, In1, In2, Rest >::myPartitionId = 0
private

Definition at line 74 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
int pdb::JoinCompBase< Out, In1, In2, Rest >::numNodes = 0
private

Definition at line 71 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
int pdb::JoinCompBase< Out, In1, In2, Rest >::numPartitions = 0
private

Definition at line 68 of file JoinCompBase.h.

template<typename Out, typename In1, typename In2, typename... Rest>
DataProxyPtr pdb::JoinCompBase< Out, In1, In2, Rest >::proxy = nullptr
private

Definition at line 81 of file JoinCompBase.h.


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