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::SimplePhysicalJoinNode Class Reference

#include <SimplePhysicalJoinNode.h>

+ Inheritance diagram for pdb::SimplePhysicalJoinNode:
+ Collaboration diagram for pdb::SimplePhysicalJoinNode:

Public Member Functions

 SimplePhysicalJoinNode (string jobId, AtomicComputationPtr node, const Handle< ComputePlan > &computePlan, LogicalPlanPtr logicalPlan, ConfigurationPtr conf)
 
PhysicalOptimizerResultPtr analyzeOutput (TupleSetJobStageBuilderPtr &ptr, SimplePhysicalNodePtr &prevNode, const StatisticsPtr &stats, int nextStageID) override
 
PhysicalOptimizerResultPtr analyzeSingleConsumer (TupleSetJobStageBuilderPtr &tupleStageBuilder, SimplePhysicalNodePtr &prevNode, const StatisticsPtr &stats, int nextStageID) override
 
- Public Member Functions inherited from pdb::SimplePhysicalNode
 SimplePhysicalNode (string jobId, AtomicComputationPtr node, const Handle< ComputePlan > &computePlan, LogicalPlanPtr logicalPlan, ConfigurationPtr conf)
 
PhysicalOptimizerResultPtr analyze (const StatisticsPtr &stats, int nextStageID) override
 
PhysicalOptimizerResultPtr analyze (TupleSetJobStageBuilderPtr &shared_ptr, SimplePhysicalNodePtr &prevNode, const StatisticsPtr &stats, int nextStageID)
 
const AtomicComputationPtrgetNode () const
 
void addConsumer (const AbstractPhysicalNodePtr &consumer) override
 
bool hasConsumers () override
 
bool isConsuming (Handle< SetIdentifier > &set) override
 
double getCost (const StatisticsPtr &stats) override
 
SimplePhysicalNodePtr getSimpleNodeHandle ()
 
- Public Member Functions inherited from pdb::AbstractPhysicalNode
 AbstractPhysicalNode (string &jobId, const Handle< ComputePlan > &computePlan, LogicalPlanPtr &logicalPlan, ConfigurationPtr &conf)
 
AbstractPhysicalNodePtr getHandle ()
 
virtual void removeConsumer (const AbstractPhysicalNodePtr &consumer)
 
AbstractPhysicalNodePtr getConsumer (int idx)
 
size_t getNumConsumers ()
 
AbstractPhysicalNodePtr getProducer (int idx)
 
size_t getNumProducers ()
 
template<typename T >
std::shared_ptr< T > to ()
 

Private Attributes

const double BROADCAST_JOIN_COST_THRESHOLD = 15000
 
bool transversed
 
string hashSetName
 
bool rollbacked
 

Additional Inherited Members

- Protected Member Functions inherited from pdb::SimplePhysicalNode
virtual PhysicalOptimizerResultPtr analyzeMultipleConsumers (TupleSetJobStageBuilderPtr &ptr, SimplePhysicalNodePtr &prevNode, const StatisticsPtr &stats, int nextStageID)
 
std::string getNodeIdentifier () override
 
double getCost (Handle< SetIdentifier > source, const StatisticsPtr &stats)
 
const Handle< SetIdentifier > & getSourceSetIdentifier () const
 
- Protected Member Functions inherited from pdb::AbstractPhysicalNode
Handle< SetIdentifiergetSetIdentifierFromComputation (Handle< Computation > computation)
 
- Protected Attributes inherited from pdb::SimplePhysicalNode
std::list< SimplePhysicalNodePtractiveConsumers
 
Handle< SetIdentifiersourceSetIdentifier
 
AtomicComputationPtr node
 
- Protected Attributes inherited from pdb::AbstractPhysicalNode
std::string jobId
 
Handle< ComputePlancomputePlan
 
LogicalPlanPtr logicalPlan
 
ConfigurationPtr conf
 
std::list
< AbstractPhysicalNodePtr
consumers
 
std::list
< AbstractPhysicalNodeWeakPtr
producers
 
AbstractPhysicalNodeWeakPtr handle
 

Detailed Description

Definition at line 26 of file SimplePhysicalJoinNode.h.

Constructor & Destructor Documentation

pdb::SimplePhysicalJoinNode::SimplePhysicalJoinNode ( string  jobId,
AtomicComputationPtr  node,
const Handle< ComputePlan > &  computePlan,
LogicalPlanPtr  logicalPlan,
ConfigurationPtr  conf 
)

Definition at line 26 of file SimplePhysicalJoinNode.cc.

Member Function Documentation

pdb::PhysicalOptimizerResultPtr pdb::SimplePhysicalJoinNode::analyzeOutput ( pdb::TupleSetJobStageBuilderPtr ptr,
SimplePhysicalNodePtr prevNode,
const StatisticsPtr stats,
int  nextStageID 
)
overridevirtual

The join can not be an output node therefore this will cause an error

Parameters
tupleStageBuilder- the builder for the tuple set job stage, that contains all the computations in our pipeline so far.
prevNode- the previous node we are coming from to analyze this node
stats- the statistics about the sets that are in the catalog
nextStageID- the id of the next stage for this job
Returns
the result will contain a partial physical plan
- non existent

Reimplemented from pdb::SimplePhysicalNode.

Definition at line 37 of file SimplePhysicalJoinNode.cc.

pdb::PhysicalOptimizerResultPtr pdb::SimplePhysicalJoinNode::analyzeSingleConsumer ( pdb::TupleSetJobStageBuilderPtr tupleStageBuilder,
SimplePhysicalNodePtr prevNode,
const StatisticsPtr stats,
int  nextStageID 
)
overridevirtual

This method is called in the case that we have just one consumer of this join node We have two main cases to handle when dealing with a join

  1. This is the first time we are processing this join therefore no side of the join has been hashed and then broadcasted or partitioned, therefore we can not probe it
  2. This is the second time we are processing this join therefore the one side of the join is hashed and then broadcasted or partitioned, we can therefore probe it!
Parameters
tupleStageBuilder- the builder for the tuple set job stage, that contains all the computations in our pipeline so far.
prevNode- the previous node we are coming from to analyze this node
stats- the statistics about the sets that are in the catalog
nextStageID- the id of the next stage for this job
Returns
the result will contain a partial physical plan
the result of the analysis

Reimplemented from pdb::SimplePhysicalNode.

Definition at line 50 of file SimplePhysicalJoinNode.cc.

+ Here is the call graph for this function:

Member Data Documentation

const double pdb::SimplePhysicalJoinNode::BROADCAST_JOIN_COST_THRESHOLD = 15000
private

This is the value where

Definition at line 79 of file SimplePhysicalJoinNode.h.

string pdb::SimplePhysicalJoinNode::hashSetName
private

Name of the hash this join has produced

Definition at line 89 of file SimplePhysicalJoinNode.h.

bool pdb::SimplePhysicalJoinNode::rollbacked
private

Did we rollback the planning for this join or not...

Definition at line 94 of file SimplePhysicalJoinNode.h.

bool pdb::SimplePhysicalJoinNode::transversed
private

Has one side of this join already been hashed?

Definition at line 84 of file SimplePhysicalJoinNode.h.


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