OmniSciDB  c07336695a
Planner::Scan Class Reference

#include <Planner.h>

+ Inheritance diagram for Planner::Scan:
+ Collaboration diagram for Planner::Scan:

Public Member Functions

 Scan (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t, const std::list< std::shared_ptr< Analyzer::Expr >> &q, double c, Plan *p, std::list< std::shared_ptr< Analyzer::Expr >> &sq, int r, const std::list< int > &cl)
 
 Scan (const Analyzer::RangeTableEntry &rte)
 
const std::list< std::shared_ptr< Analyzer::Expr > > & get_simple_quals () const
 
int get_table_id () const
 
const std::list< int > & get_col_list () const
 
void add_predicate (std::shared_ptr< Analyzer::Expr > pred)
 
void add_simple_predicate (std::shared_ptr< Analyzer::Expr > pred)
 
void print () const override
 
- Public Member Functions inherited from Planner::Plan
 Plan (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t, const std::list< std::shared_ptr< Analyzer::Expr >> &q, double c, Plan *p)
 
 Plan (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t, double c, Plan *p)
 
 Plan ()
 
 Plan (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t)
 
virtual ~Plan ()
 
const std::vector< std::shared_ptr< Analyzer::TargetEntry > > & get_targetlist () const
 
const std::list< std::shared_ptr< Analyzer::Expr > > & get_quals () const
 
double get_cost () const
 
const Planget_child_plan () const
 
void add_tle (std::shared_ptr< Analyzer::TargetEntry > tle)
 
void set_targetlist (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t)
 

Private Attributes

std::list< std::shared_ptr< Analyzer::Expr > > simple_quals
 
int table_id
 
std::list< int > col_list
 

Additional Inherited Members

- Protected Attributes inherited from Planner::Plan
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
 
std::list< std::shared_ptr< Analyzer::Expr > > quals
 
double cost
 
std::unique_ptr< Planchild_plan
 

Detailed Description

Definition at line 107 of file Planner.h.

Constructor & Destructor Documentation

◆ Scan() [1/2]

Planner::Scan::Scan ( const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &  t,
const std::list< std::shared_ptr< Analyzer::Expr >> &  q,
double  c,
Plan p,
std::list< std::shared_ptr< Analyzer::Expr >> &  sq,
int  r,
const std::list< int > &  cl 
)
inline

Definition at line 109 of file Planner.h.

Referenced by Planner::Optimizer::optimize_scans().

116  : Plan(t, q, c, p), simple_quals(sq), table_id(r), col_list(cl) {}
void c(const std::string &query_string, const ExecutorDeviceType device_type)
int table_id
Definition: Planner.h:133
std::list< int > col_list
Definition: Planner.h:134
std::list< std::shared_ptr< Analyzer::Expr > > simple_quals
Definition: Planner.h:132
+ Here is the caller graph for this function:

◆ Scan() [2/2]

Planner::Scan::Scan ( const Analyzer::RangeTableEntry rte)

Definition at line 36 of file Planner.cpp.

References col_list, Analyzer::RangeTableEntry::get_column_descs(), Analyzer::RangeTableEntry::get_table_id(), and table_id.

36  : Plan() {
37  table_id = rte.get_table_id();
38  for (auto cd : rte.get_column_descs()) {
39  col_list.push_back(cd->columnId);
40  }
41 }
int32_t get_table_id() const
const std::list< const ColumnDescriptor * > & get_column_descs() const
int table_id
Definition: Planner.h:133
std::list< int > col_list
Definition: Planner.h:134
+ Here is the call graph for this function:

Member Function Documentation

◆ add_predicate()

void Planner::Scan::add_predicate ( std::shared_ptr< Analyzer::Expr pred)
inline

Definition at line 123 of file Planner.h.

References Planner::Plan::quals.

123 { quals.push_back(pred); }
std::list< std::shared_ptr< Analyzer::Expr > > quals
Definition: Planner.h:68

◆ add_simple_predicate()

void Planner::Scan::add_simple_predicate ( std::shared_ptr< Analyzer::Expr pred)
inline

Definition at line 124 of file Planner.h.

References Planner::Plan::print().

124  {
125  simple_quals.push_back(pred);
126  }
std::list< std::shared_ptr< Analyzer::Expr > > simple_quals
Definition: Planner.h:132
+ Here is the call graph for this function:

◆ get_col_list()

const std::list<int>& Planner::Scan::get_col_list ( ) const
inline

Definition at line 122 of file Planner.h.

122 { return col_list; }
std::list< int > col_list
Definition: Planner.h:134

◆ get_simple_quals()

const std::list<std::shared_ptr<Analyzer::Expr> >& Planner::Scan::get_simple_quals ( ) const
inline

Definition at line 118 of file Planner.h.

118  {
119  return simple_quals;
120  };
std::list< std::shared_ptr< Analyzer::Expr > > simple_quals
Definition: Planner.h:132

◆ get_table_id()

int Planner::Scan::get_table_id ( ) const
inline

Definition at line 121 of file Planner.h.

121 { return table_id; }
int table_id
Definition: Planner.h:133

◆ print()

void Planner::Scan::print ( ) const
overridevirtual

Reimplemented from Planner::Plan.

Definition at line 380 of file Planner.cpp.

References col_list, Planner::Plan::print(), simple_quals, and table_id.

380  {
381  std::cout << "(Scan" << std::endl;
382  Plan::print();
383  std::cout << "simple_quals: ";
384  for (auto p : simple_quals) {
385  p->print();
386  }
387  std::cout << std::endl << "table: " << table_id;
388  std::cout << " columns: ";
389  for (auto i : col_list) {
390  std::cout << i;
391  std::cout << " ";
392  }
393  std::cout << ")" << std::endl;
394 }
virtual void print() const
Definition: Planner.cpp:356
int table_id
Definition: Planner.h:133
std::list< int > col_list
Definition: Planner.h:134
std::list< std::shared_ptr< Analyzer::Expr > > simple_quals
Definition: Planner.h:132
+ Here is the call graph for this function:

Member Data Documentation

◆ col_list

std::list<int> Planner::Scan::col_list
private

Definition at line 134 of file Planner.h.

Referenced by print(), and Scan().

◆ simple_quals

std::list<std::shared_ptr<Analyzer::Expr> > Planner::Scan::simple_quals
private

Definition at line 132 of file Planner.h.

Referenced by print().

◆ table_id

int Planner::Scan::table_id
private

Definition at line 133 of file Planner.h.

Referenced by print(), and Scan().


The documentation for this class was generated from the following files: