OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

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
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66
std::list< std::shared_ptr< Analyzer::Expr > > quals
Definition: Planner.h:68
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
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66
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
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
virtual Planner::Plan::~Plan ( )
inlinevirtual

Definition at line 51 of file Planner.h.

51 {}

Member Function Documentation

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
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:

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
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
const std::vector<std::shared_ptr<Analyzer::TargetEntry> >& Planner::Plan::get_targetlist ( ) const
inline

Definition at line 52 of file Planner.h.

References targetlist.

Referenced by Planner::Optimizer::optimize_aggs(), Planner::Optimizer::optimize_orderby(), Planner::Optimizer::optimize_query(), and Planner::Optimizer::process_targetlist().

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

+ Here is the caller graph for this function:

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::Result::print(), Planner::Scan::print(), Planner::ValuesScan::print(), Planner::Join::print(), Planner::AggPlan::print(), and Planner::Sort::print().

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:

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

Definition at line 59 of file Planner.h.

References targetlist.

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

59  {
60  targetlist = t;
61  }
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targetlist
Definition: Planner.h:66

+ Here is the caller graph for this function:

Member Data Documentation

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

Definition at line 69 of file Planner.h.

Referenced by get_cost().

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().

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: