taco-db  0.1.0
TempTableState.h
Go to the documentation of this file.
1 #ifndef EXECUTION_TEMPTABLESTATE_H
2 #define EXECUTION_TEMPTABLESTATE_H
3 
5 #include "plan/TempTable.h"
6 
7 namespace taco {
8 
17 public:
18  ~TempTableState() override;
19 
20  void node_properties_to_string(std::string& buf, int indent) const override;
21 
22  void init() override;
23 
24  bool next_tuple() override;
25 
26  std::vector<NullableDatumRef> get_record() override;
27 
28  void close() override;
29 
30  void rewind() override;
31 
32  const PlanNode*
33  get_plan() const {
34  return m_plan;
35  }
36 
37  Datum save_position() const override;
38 
39  bool rewind(DatumRef saved_position) override;
40 
41 private:
42  TempTableState(const TempTable* plan);
43 
44  const TempTable* m_plan;
45 
46  int64_t m_pos;
47 
48  friend class TempTable;
49 };
50 
51 } // namespace taco
52 
53 #endif
taco::TempTableState::save_position
Datum save_position() const override
Returns a saved position where this plan execution state is at.
Definition: TempTableState.cpp:57
taco::DatumRef
A DatumRef object is a read-only reference to an C++ object of a supported runtime type.
Definition: datum.h:823
taco::TempTableState::get_plan
const PlanNode * get_plan() const
Returns the corresponding plan.
Definition: TempTableState.h:33
TempTable.h
taco
Definition: datum.h:28
taco::TempTableState::rewind
void rewind() override
Rewind the execution state as if it has just been initialized.
Definition: TempTableState.cpp:51
taco::TempTableState::m_plan
const TempTable * m_plan
Definition: TempTableState.h:44
taco::TempTableState::TempTableState
TempTableState(const TempTable *plan)
Definition: TempTableState.cpp:5
taco::TempTableState::~TempTableState
~TempTableState() override
Definition: TempTableState.cpp:9
taco::TempTableState::close
void close() override
Clear internal states, mark we have finish retrieving output records from this execution state,...
Definition: TempTableState.cpp:45
taco::TempTableState::get_record
std::vector< NullableDatumRef > get_record() override
Return the deserialized output record to which this execution state currently points.
Definition: TempTableState.cpp:35
taco::TempTable
TempTable is the physical plan for scanning on a temp in-memory table.
Definition: TempTable.h:18
taco::TempTableState::next_tuple
bool next_tuple() override
Moves the iterator of this execution state to the next output record.
Definition: TempTableState.cpp:28
taco::TempTableState
TempTableState is the execution state for a in-memory temp table scan.
Definition: TempTableState.h:16
taco::PlanExecState
PlanExecState is an abstract interface for execution state of various query plan.
Definition: PlanExecState.h:19
taco::TempTableState::init
void init() override
Initialize this plan execution state, set m_initialized to true and initialize all corresponding stat...
Definition: TempTableState.cpp:21
taco::Datum
A Datum stores and possibly manage the memory resource of a read-only value of a plain fixed-length C...
Definition: datum.h:250
PlanExecState.h
taco::PlanNode
PlanNode is an abstract interface representing physical query plan that does not bound with any parti...
Definition: PlanNode.h:26
taco::TempTableState::m_pos
int64_t m_pos
Definition: TempTableState.h:46
taco::TempTableState::node_properties_to_string
void node_properties_to_string(std::string &buf, int indent) const override
Definition: TempTableState.cpp:16