taco-db  0.1.0
TempTable.h
Go to the documentation of this file.
1 #ifndef PLAN_TEMPTABLE_H
2 #define PLAN_TEMPTABLE_H
3 
4 #include "plan/PlanNode.h"
5 #include "catalog/Schema.h"
6 
7 namespace taco {
8 
9 class TempTableState;
10 
18 class TempTable: public PlanNode {
19 public:
20  static std::unique_ptr<TempTable>
21  Create(const Schema* schema);
22 
23  ~TempTable() override;
24 
29  void insert_record(std::vector<Datum>&& record);
30 
31  void node_properties_to_string(std::string& buf, int indent) const override;
32 
33  std::unique_ptr<PlanExecState> create_exec_state() const override;
34 
35  const Schema* get_output_schema() const override;
36 
37 private:
38  TempTable(const Schema* schema);
39 
40  // You can add your own states here.
41 
42  friend class TempTableState;
43 };
44 
45 } // namespace taco
46 
47 #endif
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
TempTableState is the execution state for a in-memory temp table scan.
Definition: TempTableState.h:16
TempTable is the physical plan for scanning on a temp in-memory table.
Definition: TempTable.h:18
const Schema * get_output_schema() const override
Each physical plan should link a schema for its output relation, incidating what fields are included ...
Definition: TempTable.cpp:38
TempTable(const Schema *schema)
Definition: TempTable.cpp:6
void insert_record(std::vector< Datum > &&record)
Move a fully constructed deserialized record into the in-memory temp table this physical plan associa...
Definition: TempTable.cpp:22
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: TempTable.cpp:32
void node_properties_to_string(std::string &buf, int indent) const override
Definition: TempTable.cpp:27
static std::unique_ptr< TempTable > Create(const Schema *schema)
Definition: TempTable.cpp:13
~TempTable() override
Definition: TempTable.cpp:17
Definition: datum.h:28