taco-db  0.1.0
CartesianProduct.h
Go to the documentation of this file.
1 #ifndef PLAN_CARTESIANPRODUCT_H
2 #define PLAN_CARTESIANPRODUCT_H
3 
4 #include "plan/PlanNode.h"
5 #include "catalog/Schema.h"
6 
7 namespace taco {
8 
9 class CartesianProductState;
10 
15 class CartesianProduct: public PlanNode {
16 public:
17  static std::unique_ptr<CartesianProduct>
18  Create(std::unique_ptr<PlanNode>&& left,
19  std::unique_ptr<PlanNode>&& right);
20 
21  ~CartesianProduct() override;
22 
23  void node_properties_to_string(std::string& buf, int indent) const override;
24 
25  std::unique_ptr<PlanExecState> create_exec_state() const override;
26 
27  const Schema* get_output_schema() const override;
28 
29 private:
30  CartesianProduct(std::unique_ptr<PlanNode>&& left,
31  std::unique_ptr<PlanNode>&& right);
32 
33  // You can add your own states here.
34 
35  friend class CartesianProductState;
36 };
37 
38 } // namespace taco
39 
40 #endif
CartesianProductState is the execution state for cartesian product.
Definition: CartesianProductState.h:16
CartesianProduct is the physical plan for Cartesian products.
Definition: CartesianProduct.h:15
void node_properties_to_string(std::string &buf, int indent) const override
Definition: CartesianProduct.cpp:26
const Schema * get_output_schema() const override
Each physical plan should link a schema for its output relation, incidating what fields are included ...
Definition: CartesianProduct.cpp:37
std::unique_ptr< PlanExecState > create_exec_state() const override
Create the corresponding execution state for the physical plan so that it can be used as physical sca...
Definition: CartesianProduct.cpp:31
~CartesianProduct() override
Definition: CartesianProduct.cpp:21
static std::unique_ptr< CartesianProduct > Create(std::unique_ptr< PlanNode > &&left, std::unique_ptr< PlanNode > &&right)
Definition: CartesianProduct.cpp:14
CartesianProduct(std::unique_ptr< PlanNode > &&left, std::unique_ptr< PlanNode > &&right)
Definition: CartesianProduct.cpp:6
PlanNode is an abstract interface representing physical query plan that does not bound with any parti...
Definition: PlanNode.h:26
A Schema object stores the information for accessing an ordered set of typed fields either from a dis...
Definition: Schema.h:39
Definition: datum.h:28