OmniSciDB  c07336695a
Planner::Sort Class Reference

#include <Planner.h>

+ Inheritance diagram for Planner::Sort:
+ Collaboration diagram for Planner::Sort:

Public Member Functions

 Sort (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t, double c, Plan *p, const std::list< Analyzer::OrderEntry > &oe, bool d)
 
const std::list< Analyzer::OrderEntry > & get_order_entries () const
 
bool get_remove_duplicates () const
 
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< Analyzer::OrderEntryorder_entries
 
bool remove_duplicates
 

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

Constructor & Destructor Documentation

◆ Sort()

Planner::Sort::Sort ( const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &  t,
double  c,
Plan p,
const std::list< Analyzer::OrderEntry > &  oe,
bool  d 
)
inline

Definition at line 247 of file Planner.h.

252  : Plan(t, c, p), order_entries(oe), remove_duplicates(d) {}
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268
void c(const std::string &query_string, const ExecutorDeviceType device_type)
std::list< Analyzer::OrderEntry > order_entries
Definition: Planner.h:261
bool remove_duplicates
Definition: Planner.h:262

Member Function Documentation

◆ get_order_entries()

const std::list<Analyzer::OrderEntry>& Planner::Sort::get_order_entries ( ) const
inline

Definition at line 253 of file Planner.h.

253  {
254  return order_entries;
255  }
std::list< Analyzer::OrderEntry > order_entries
Definition: Planner.h:261

◆ get_remove_duplicates()

bool Planner::Sort::get_remove_duplicates ( ) const
inline

Definition at line 256 of file Planner.h.

References Planner::Plan::print().

256 { return remove_duplicates; }
bool remove_duplicates
Definition: Planner.h:262
+ Here is the call graph for this function:

◆ print()

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

Reimplemented from Planner::Plan.

Definition at line 439 of file Planner.cpp.

References Planner::Plan::child_plan, and Planner::Plan::print().

439  {
440  std::cout << "(Sort" << std::endl;
441  Plan::print();
442  child_plan->print();
443  std::cout << "Order By: ";
444  for (auto o : order_entries) {
445  o.print();
446  }
447  std::cout << ")" << std::endl;
448 }
std::unique_ptr< Plan > child_plan
Definition: Planner.h:70
virtual void print() const
Definition: Planner.cpp:356
std::list< Analyzer::OrderEntry > order_entries
Definition: Planner.h:261
+ Here is the call graph for this function:

Member Data Documentation

◆ order_entries

std::list<Analyzer::OrderEntry> Planner::Sort::order_entries
private

Definition at line 261 of file Planner.h.

◆ remove_duplicates

bool Planner::Sort::remove_duplicates
private

Definition at line 262 of file Planner.h.


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