taco-db  0.1.0
IndexScan.h
Go to the documentation of this file.
1 #ifndef PLAN_INDEXSCAN_H
2 #define PLAN_INDEXSCAN_H
3 
4 #include "plan/PlanNode.h"
5 #include "catalog/IndexDesc.h"
6 #include "catalog/TableDesc.h"
7 #include "index/IndexKey.h"
8 
9 namespace taco {
10 
11 class IndexScanState;
12 
24 class IndexScan: public PlanNode {
25 public:
26  static std::unique_ptr<IndexScan>
27  Create(std::shared_ptr<const IndexDesc> idxdesc,
28  const IndexKey* low, bool lower_isstrict,
29  const IndexKey* high, bool higher_isstrict);
30 
31  ~IndexScan() override;
32 
33  void node_properties_to_string(std::string& buf, int indent) const override;
34 
35  std::unique_ptr<PlanExecState> create_exec_state() const override;
36 
37  const Schema* get_output_schema() const override;
38 
39 private:
40  IndexScan(std::shared_ptr<const IndexDesc> idxdesc,
41  const IndexKey* low, bool lower_isstrict,
42  const IndexKey* high, bool higher_isstrict);
43 
44  // TODO you may add any class members here
45 
46  friend class IndexScanState;
47 };
48 
49 } // namespace taco
50 
51 #endif
IndexScanState is the execution state for index based table scan.
Definition: IndexScanState.h:23
IndexScan is the physical plan for index based table scanning.
Definition: IndexScan.h:24
~IndexScan() override
Definition: IndexScan.cpp:28
static std::unique_ptr< IndexScan > Create(std::shared_ptr< const IndexDesc > idxdesc, const IndexKey *low, bool lower_isstrict, const IndexKey *high, bool higher_isstrict)
Definition: IndexScan.cpp:21
void node_properties_to_string(std::string &buf, int indent) const override
Definition: IndexScan.cpp:33
IndexScan(std::shared_ptr< const IndexDesc > idxdesc, const IndexKey *low, bool lower_isstrict, const IndexKey *high, bool higher_isstrict)
Definition: IndexScan.cpp:7
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: IndexScan.cpp:38
const Schema * get_output_schema() const override
Each physical plan should link a schema for its output relation, incidating what fields are included ...
Definition: IndexScan.cpp:44
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
An IndexKey stores references to a few data (Datum objects) that comprise a key tuple to in an index.
Definition: IndexKey.h:35