taco-db  0.1.0
Projection.h
Go to the documentation of this file.
1 #ifndef PLAN_PROJECTION_H
2 #define PLAN_PROJECTION_H
3 
4 #include "tdb.h"
6 
7 #include "plan/PlanNode.h"
8 #include "expr/ExprNode.h"
9 
10 namespace taco {
11 
12 class ProjectionState;
13 
20 class Projection: public PlanNode {
21 public:
22  static std::unique_ptr<Projection>
23  Create(std::unique_ptr<PlanNode>&& child,
24  std::vector<std::unique_ptr<ExprNode>>&& exprs);
25 
26  ~Projection() override;
27 
28  void node_properties_to_string(std::string& buf, int indent) const override;
29 
30  std::unique_ptr<PlanExecState> create_exec_state() const override;
31 
32  const Schema* get_output_schema() const override;
33 private:
34  Projection(std::unique_ptr<PlanNode>&& child,
35  std::vector<std::unique_ptr<ExprNode>>&& exprs);
36 
37  std::vector<std::unique_ptr<ExprNode>> m_exprs;
38  std::unique_ptr<Schema> m_schema;
39 
40  friend class ProjectionState;
41 };
42 
43 } // namespace taco
44 
45 #endif
This file is automatically generated, DO NOT modify.
PlanNode is an abstract interface representing physical query plan that does not bound with any parti...
Definition: PlanNode.h:26
ProjectionState is the execution state for projections.
Definition: ProjectionState.h:18
Projection is the physical plan for projections.
Definition: Projection.h:20
static std::unique_ptr< Projection > Create(std::unique_ptr< PlanNode > &&child, std::vector< std::unique_ptr< ExprNode >> &&exprs)
Definition: Projection.cpp:23
std::vector< std::unique_ptr< ExprNode > > m_exprs
Definition: Projection.h:37
Projection(std::unique_ptr< PlanNode > &&child, std::vector< std::unique_ptr< ExprNode >> &&exprs)
Definition: Projection.cpp:6
void node_properties_to_string(std::string &buf, int indent) const override
Definition: Projection.cpp:33
std::unique_ptr< Schema > m_schema
Definition: Projection.h:38
~Projection() override
Definition: Projection.cpp:29
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: Projection.cpp:37
const Schema * get_output_schema() const override
Each physical plan should link a schema for its output relation, incidating what fields are included ...
Definition: Projection.cpp:43
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