OmniSciDB  04ee39c94c
Planner::anonymous_namespace{Planner.cpp} Namespace Reference

Functions

const Planner::Scanget_scan_child (const Planner::Plan *plan)
 
std::vector< std::shared_ptr< Analyzer::TargetEntry > > get_join_target_list (const Planner::Join *join_plan)
 

Function Documentation

◆ get_join_target_list()

std::vector<std::shared_ptr<Analyzer::TargetEntry> > Planner::anonymous_namespace{Planner.cpp}::get_join_target_list ( const Planner::Join join_plan)

Definition at line 200 of file Planner.cpp.

References CHECK, Planner::Join::get_innerplan(), Planner::Join::get_outerplan(), and get_scan_child().

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

201  {
202  const auto outer_plan = get_scan_child(join_plan->get_outerplan());
203  CHECK(outer_plan);
204  auto join_target_list = outer_plan->get_targetlist();
205  const auto inner_plan = get_scan_child(join_plan->get_innerplan());
206  CHECK(inner_plan);
207  const auto inner_target_list = inner_plan->get_targetlist();
208  join_target_list.insert(
209  join_target_list.end(), inner_target_list.begin(), inner_target_list.end());
210  return join_target_list;
211 }
const Plan * get_innerplan() const
Definition: Planner.h:162
const Planner::Scan * get_scan_child(const Planner::Plan *plan)
Definition: Planner.cpp:194
#define CHECK(condition)
Definition: Logger.h:187
const Plan * get_outerplan() const
Definition: Planner.h:161
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_scan_child()

const Planner::Scan* Planner::anonymous_namespace{Planner.cpp}::get_scan_child ( const Planner::Plan plan)

Definition at line 194 of file Planner.cpp.

References Planner::Plan::get_child_plan().

Referenced by get_join_target_list().

194  {
195  const auto agg_plan = dynamic_cast<const Planner::AggPlan*>(plan);
196  return agg_plan ? dynamic_cast<const Planner::Scan*>(plan->get_child_plan())
197  : dynamic_cast<const Planner::Scan*>(plan);
198 }
const Plan * get_child_plan() const
Definition: Planner.h:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function: