OmniSciDB  04ee39c94c
Planner::Plan Class Reference

#include <Planner.h>

+ Inheritance diagram for Planner::Plan:

Public Member Functions

 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)
 
virtual void print () const
 

Protected Attributes

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 39 of file Planner.h.

Constructor & Destructor Documentation

◆ Plan() [1/4]

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 
)
inline

Definition at line 41 of file Planner.h.

45  : targetlist(t), quals(q), cost(c), child_plan(p) {}
std::unique_ptr< Plan > child_plan
Definition: Planner.h:70
double cost
Definition: Planner.h:69
void c(const std::string &query_string, const ExecutorDeviceType device_type)
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66
std::list< std::shared_ptr< Analyzer::Expr > > quals
Definition: Planner.h:68

◆ Plan() [2/4]

Planner::Plan::Plan ( const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &  t,
double  c,
Plan p 
)
inline

Definition at line 46 of file Planner.h.

47  : targetlist(t), cost(c), child_plan(p) {}
std::unique_ptr< Plan > child_plan
Definition: Planner.h:70
double cost
Definition: Planner.h:69
void c(const std::string &query_string, const ExecutorDeviceType device_type)
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66

◆ Plan() [3/4]

Planner::Plan::Plan ( )
inline

Definition at line 48 of file Planner.h.

48 : cost(0.0), child_plan(nullptr) {}
std::unique_ptr< Plan > child_plan
Definition: Planner.h:70
double cost
Definition: Planner.h:69

◆ Plan() [4/4]

Planner::Plan::Plan ( const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &  t)
inline

Definition at line 49 of file Planner.h.

50  : targetlist(t), cost(0.0), child_plan(nullptr) {}
std::unique_ptr< Plan > child_plan
Definition: Planner.h:70
double cost
Definition: Planner.h:69
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66

◆ ~Plan()

virtual Planner::Plan::~Plan ( )
inlinevirtual

Definition at line 51 of file Planner.h.

51 {}

Member Function Documentation

◆ add_tle()

void Planner::Plan::add_tle ( std::shared_ptr< Analyzer::TargetEntry tle)
inline

Definition at line 58 of file Planner.h.

References targetlist.

58 { targetlist.push_back(tle); }
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66

◆ get_child_plan()

const Plan* Planner::Plan::get_child_plan ( ) const
inline

Definition at line 57 of file Planner.h.

References child_plan.

Referenced by Planner::anonymous_namespace{Planner.cpp}::get_scan_child().

57 { return child_plan.get(); }
std::unique_ptr< Plan > child_plan
Definition: Planner.h:70
+ Here is the caller graph for this function:

◆ get_cost()

double Planner::Plan::get_cost ( ) const
inline

Definition at line 56 of file Planner.h.

References cost.

56 { return cost; }
double cost
Definition: Planner.h:69

◆ get_quals()

const std::list<std::shared_ptr<Analyzer::Expr> >& Planner::Plan::get_quals ( ) const
inline

Definition at line 55 of file Planner.h.

References quals.

55 { return quals; }
std::list< std::shared_ptr< Analyzer::Expr > > quals
Definition: Planner.h:68

◆ get_targetlist()

const std::vector<std::shared_ptr<Analyzer::TargetEntry> >& Planner::Plan::get_targetlist ( ) const
inline

Definition at line 52 of file Planner.h.

References targetlist.

52  {
53  return targetlist;
54  }
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66

◆ print()

void Planner::Plan::print ( ) const
virtual

Reimplemented in Planner::Sort, Planner::MergeAppend, Planner::Append, Planner::AggPlan, Planner::Join, Planner::ValuesScan, Planner::Scan, and Planner::Result.

Definition at line 356 of file Planner.cpp.

References quals, and targetlist.

Referenced by Planner::Scan::add_simple_predicate(), Planner::Result::get_constquals(), Planner::MergeAppend::get_order_entries(), Planner::Append::get_plan_list(), Planner::Sort::get_remove_duplicates(), Planner::RootPlan::getCatalog(), Planner::Join::Join(), Planner::Result::print(), Planner::Scan::print(), Planner::ValuesScan::print(), Planner::Join::print(), Planner::AggPlan::print(), Planner::Sort::print(), Planner::AggPlan::set_groupby_list(), set_targetlist(), and Planner::ValuesScan::ValuesScan().

356  {
357  std::cout << "targetlist: ";
358  for (auto t : targetlist) {
359  t->print();
360  }
361  std::cout << std::endl;
362  std::cout << "quals: ";
363  for (auto p : quals) {
364  p->print();
365  }
366  std::cout << std::endl;
367 }
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66
std::list< std::shared_ptr< Analyzer::Expr > > quals
Definition: Planner.h:68
+ Here is the caller graph for this function:

◆ set_targetlist()

void Planner::Plan::set_targetlist ( const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &  t)
inline

Definition at line 59 of file Planner.h.

References print(), and targetlist.

59  {
60  targetlist = t;
61  }
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66
+ Here is the call graph for this function:

Member Data Documentation

◆ child_plan

std::unique_ptr<Plan> Planner::Plan::child_plan
protected

◆ cost

double Planner::Plan::cost
protected

Definition at line 69 of file Planner.h.

Referenced by get_cost().

◆ quals

std::list<std::shared_ptr<Analyzer::Expr> > Planner::Plan::quals
protected

Definition at line 68 of file Planner.h.

Referenced by Planner::Scan::add_predicate(), get_quals(), and print().

◆ targetlist

std::vector<std::shared_ptr<Analyzer::TargetEntry> > Planner::Plan::targetlist
protected

Definition at line 66 of file Planner.h.

Referenced by add_tle(), get_targetlist(), print(), and set_targetlist().


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