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
AdvancedPhysicalAbstractAlgorithm.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_ADVANCEDPHYSICALALGORITHM_H
20 #define PDB_ADVANCEDPHYSICALALGORITHM_H
21 
23 
24 namespace pdb {
25 
26 
34 };
35 
37 typedef std::shared_ptr<AdvancedPhysicalAbstractAlgorithm> AdvancedPhysicalAbstractAlgorithmPtr;
38 
40 
41 public:
42 
44  const std::string &jobID,
45  bool isProbing,
46  bool isOutput,
50  const ConfigurationPtr &conf);
51 
56  virtual PhysicalOptimizerResultPtr generate(int nextStageID, const StatisticsPtr &stats) = 0;
57 
64  virtual PhysicalOptimizerResultPtr generatePipelined(int nextStageID,
65  const StatisticsPtr &stats,
66  std::vector<AdvancedPhysicalPipelineNodePtr> &pipesToPipeline);
67 
73 
74 protected:
75 
82 
89  DataStatistics approxSize,
90  const StatisticsPtr &stats);
91 
98 
104 
108  void extractHashSetsToProbe();
109 
113  std::list<AdvancedPhysicalPipelineNodePtr> pipeline;
114 
118  std::string jobID;
119 
123  list<AtomicComputationPtr> pipelineComputations;
124 
128  unordered_map<std::string, std::string> probingHashSets;
129 
134 
139 
144 
149 
154 
158  bool isProbing;
159 
163  bool isOutput;
164 };
165 
166 }
167 
168 
169 #endif //PDB_ADVANCEDPHYSICALALGORITHM_H
std::shared_ptr< Statistics > StatisticsPtr
Definition: Statistics.h:27
void updateConsumers(const Handle< SetIdentifier > &sink, DataStatistics approxSize, const StatisticsPtr &stats)
std::list< AdvancedPhysicalPipelineNodePtr > pipeline
AdvancedPhysicalAbstractAlgorithm(const AdvancedPhysicalPipelineNodePtr &handle, const std::string &jobID, bool isProbing, bool isOutput, Handle< SetIdentifier > source, Handle< ComputePlan > computePlan, const LogicalPlanPtr &logicalPlan, const ConfigurationPtr &conf)
std::shared_ptr< LogicalPlan > LogicalPlanPtr
Definition: ComputePlan.h:36
virtual AdvancedPhysicalAbstractAlgorithmTypeID getType()=0
virtual DataStatistics approximateResultSize(const StatisticsPtr &stats)
shared_ptr< Configuration > ConfigurationPtr
Definition: Configuration.h:89
virtual PhysicalOptimizerResultPtr generate(int nextStageID, const StatisticsPtr &stats)=0
unordered_map< std::string, std::string > probingHashSets
virtual PhysicalOptimizerResultPtr generatePipelined(int nextStageID, const StatisticsPtr &stats, std::vector< AdvancedPhysicalPipelineNodePtr > &pipesToPipeline)
std::shared_ptr< AdvancedPhysicalAbstractPipe > AdvancedPhysicalPipelineNodePtr
std::shared_ptr< PhysicalOptimizerResult > PhysicalOptimizerResultPtr
std::shared_ptr< AdvancedPhysicalAbstractAlgorithm > AdvancedPhysicalAbstractAlgorithmPtr