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  // AggType m_aggtyp;
57  // Oid m_aggid;
58  std::unique_ptr<Schema> m_schema;
59  std::vector<std::unique_ptr<ExprNode>> m_exprs;
60  std::vector<std::shared_ptr<const SysTable_Aggregation>> m_aggfuncs;
61 
62  friend class AggregationState;
63 };
64 
65 } // namespace taco
66 
67 #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:59
std::vector< std::unique_ptr< ExprNode > > m_exprs
Definition: Aggregation.h:59
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:48
std::unique_ptr< Schema > m_schema
Definition: Aggregation.h:58
~Aggregation() override
Definition: Aggregation.cpp:36
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:53
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:40
std::vector< std::shared_ptr< const SysTable_Aggregation > > m_aggfuncs
Definition: Aggregation.h:60
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