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
AdvancedPhysicalAbstractPipe.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * *
3  * Copyright 2018 Rice University *
4  * *
5  * Licensed under the Apache License, Version 2.0 (the "License"); *
6  * you may not use this file except in compliance with the License. *
7  * You may obtain a copy of the License at *
8  * *
9  * http://www.apache.org/licenses/LICENSE-2.0 *
10  * *
11  * Unless required by applicable law or agreed to in writing, software *
12  * distributed under the License is distributed on an "AS IS" BASIS, *
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14  * See the License for the specific language governing permissions and *
15  * limitations under the License. *
16  * *
17  *****************************************************************************/
18 
19 #ifndef PDB_ADVANCEDPHYSICALNODE_H
20 #define PDB_ADVANCEDPHYSICALNODE_H
21 
22 #include "AbstractPhysicalNode.h"
23 
24 namespace pdb {
25 
30 typedef std::shared_ptr<AdvancedPhysicalAbstractAlgorithm> AdvancedPhysicalAbstractAlgorithmPtr;
31 
36 typedef std::shared_ptr<AdvancedPhysicalAbstractPipe> AdvancedPhysicalPipelineNodePtr;
37 
45 };
46 
52  public:
53 
58  vector<AtomicComputationPtr> &pipeComputations,
59  size_t id);
60 
67  PhysicalOptimizerResultPtr analyze(const StatisticsPtr &stats, int nextStageID) override;
68 
74  virtual PhysicalOptimizerResultPtr pipelineMe(int nextStageID,
75  std::vector<AdvancedPhysicalPipelineNodePtr> pipeline,
76  const StatisticsPtr &stats);
77 
83  virtual PhysicalOptimizerResultPtr chainMe(int nextStageID,
84  const StatisticsPtr &stats,
86 
92  virtual bool isChainable();
93 
100 
105  virtual bool isExecuted();
106 
112 
118 
123  virtual std::vector<AdvancedPhysicalAbstractAlgorithmPtr> getPossibleAlgorithms(const StatisticsPtr &stats) = 0;
124 
130  virtual AdvancedPhysicalAbstractAlgorithmPtr propose(std::vector<AdvancedPhysicalAbstractAlgorithmPtr> algorithms);
131 
136  const bool isJoining();
137 
142  const bool isAggregating();
143 
149  std::unordered_map<std::string, std::string> getProbingHashSets();
150 
156 
163  double getCost(const StatisticsPtr &stats) override;
164 
169  bool isSource();
170 
175  bool hasConsumers() override;
176 
177  bool isConsuming(Handle<SetIdentifier> &set) override;
178 
183  string getNodeIdentifier() override;
184 
190 
197 
202  const vector<AtomicComputationPtr> &getPipeComputations() const;
203 
209 
215 
216  protected:
217 
223 
227  vector<AtomicComputationPtr> pipeComputations;
228 
232  size_t id;
233 
238 
239 };
240 
241 }
242 
243 #endif //PDB_ADVANCEDPHYSICALNODE_H
virtual AdvancedPhysicalAbstractAlgorithmPtr selectOutputAlgorithm()=0
Handle< ComputePlan > computePlan
std::shared_ptr< Statistics > StatisticsPtr
Definition: Statistics.h:27
virtual PhysicalOptimizerResultPtr chainMe(int nextStageID, const StatisticsPtr &stats, PhysicalOptimizerResultPtr previous)
const vector< AtomicComputationPtr > & getPipeComputations() const
vector< AtomicComputationPtr > pipeComputations
AdvancedPhysicalPipelineNodePtr getAdvancedPhysicalNodeHandle()
AdvancedPhysicalAbstractAlgorithmPtr selectedAlgorithm
virtual AdvancedPhysicalAbstractAlgorithmPtr propose(std::vector< AdvancedPhysicalAbstractAlgorithmPtr > algorithms)
virtual PhysicalOptimizerResultPtr pipelineMe(int nextStageID, std::vector< AdvancedPhysicalPipelineNodePtr > pipeline, const StatisticsPtr &stats)
AdvancedPhysicalAbstractPipe(string &jobId, const Handle< ComputePlan > &computePlan, LogicalPlanPtr &logicalPlan, ConfigurationPtr &conf, vector< AtomicComputationPtr > &pipeComputations, size_t id)
std::shared_ptr< LogicalPlan > LogicalPlanPtr
Definition: ComputePlan.h:36
void setSourceSetIdentifier(const Handle< SetIdentifier > &sourceSetIdentifier)
PhysicalOptimizerResultPtr analyze(const StatisticsPtr &stats, int nextStageID) override
double getCost(const StatisticsPtr &stats) override
std::unordered_map< std::string, std::string > getProbingHashSets()
AtomicComputationPtr getPipelineComputationAt(size_t idx)
bool isConsuming(Handle< SetIdentifier > &set) override
virtual AdvancedPhysicalPipelineTypeID getType()=0
shared_ptr< Configuration > ConfigurationPtr
Definition: Configuration.h:89
std::shared_ptr< struct AtomicComputation > AtomicComputationPtr
virtual std::vector< AdvancedPhysicalAbstractAlgorithmPtr > getPossibleAlgorithms(const StatisticsPtr &stats)=0
std::shared_ptr< AdvancedPhysicalAbstractPipe > AdvancedPhysicalPipelineNodePtr
const Handle< SetIdentifier > & getSourceSetIdentifier() const
virtual bool isPipelinable(AdvancedPhysicalPipelineNodePtr node)
std::shared_ptr< PhysicalOptimizerResult > PhysicalOptimizerResultPtr
const AdvancedPhysicalAbstractAlgorithmPtr & getSelectedAlgorithm() const
std::shared_ptr< AdvancedPhysicalAbstractAlgorithm > AdvancedPhysicalAbstractAlgorithmPtr