taco-db  0.1.0
Aggregation.h
Go to the documentation of this file.
1 #ifndef PLAN_AGGREGATION_H
2 #define PLAN_AGGREGATION_H
3 
4 #include "plan/PlanNode.h"
5 #include "expr/ExprNode.h"
7 
8 namespace taco {
9 
10 class AggregationState;
11 
35 class Aggregation: public PlanNode {
36 public:
37  static std::unique_ptr<Aggregation>
38  Create(std::unique_ptr<PlanNode>&& child,
39  std::vector<std::unique_ptr<ExprNode>>&& exprs,
40  const std::vector<AggType>& aggtyps);
41 
42  ~Aggregation() override;
43 
44  void node_properties_to_string(std::string& buf, int indent) const override;
45 
46  std::unique_ptr<PlanExecState> create_exec_state() const override;
47 
48  const Schema* get_output_schema() const override;
49 
50 private:
51  Aggregation(std::unique_ptr<PlanNode>&& child,
52  std::vector<std::unique_ptr<ExprNode>>&& exprs,
53  const std::vector<AggType>& aggtyps);
54 
55 
56  // You can add your own states here.
57 
58  friend class AggregationState;
59 };
60 
61 } // namespace taco
62 
63 #endif
This file is automatically generated, DO NOT modify.
AggregationState is the execution state for aggregation.
Definition: AggregationState.h:17
Aggregation is the physical plan for aggregations.
Definition: Aggregation.h:35
const Schema * get_output_schema() const override
Each physical plan should link a schema for its output relation, incidating what fields are included ...
Definition: Aggregation.cpp:39
Aggregation(std::unique_ptr< PlanNode > &&child, std::vector< std::unique_ptr< ExprNode >> &&exprs, const std::vector< AggType > &aggtyps)
Definition: Aggregation.cpp:7
void node_properties_to_string(std::string &buf, int indent) const override
Definition: Aggregation.cpp:28
~Aggregation() override
Definition: Aggregation.cpp:15
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: Aggregation.cpp:33
static std::unique_ptr< Aggregation > Create(std::unique_ptr< PlanNode > &&child, std::vector< std::unique_ptr< ExprNode >> &&exprs, const std::vector< AggType > &aggtyps)
Definition: Aggregation.cpp:20
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