OmniSciDB  04ee39c94c
RelAlgExecutionDescriptor.cpp File Reference
#include "RelAlgExecutionDescriptor.h"
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/topological_sort.hpp>
+ Include dependency graph for RelAlgExecutionDescriptor.cpp:

Go to the source code of this file.

Namespaces

 anonymous_namespace{RelAlgExecutionDescriptor.cpp}
 

Typedefs

using anonymous_namespace{RelAlgExecutionDescriptor.cpp}::DAG = boost::adjacency_list< boost::setS, boost::vecS, boost::bidirectionalS, const RelAlgNode * >
 
using anonymous_namespace{RelAlgExecutionDescriptor.cpp}::Vertex = DAG::vertex_descriptor
 

Functions

std::vector< Vertex > anonymous_namespace{RelAlgExecutionDescriptor.cpp}::merge_sort_with_input (const std::vector< Vertex > &vertices, const DAG &graph)
 
std::vector< Vertex > anonymous_namespace{RelAlgExecutionDescriptor.cpp}::merge_join_with_non_join (const std::vector< Vertex > &vertices, const DAG &graph)
 
DAG anonymous_namespace{RelAlgExecutionDescriptor.cpp}::build_dag (const RelAlgNode *sink)
 
std::vector< const RelAlgNode * > anonymous_namespace{RelAlgExecutionDescriptor.cpp}::schedule_ra_dag (const RelAlgNode *sink)
 
std::vector< RaExecutionDescget_execution_descriptors (const RelAlgNode *ra_node)
 
std::vector< RaExecutionDescget_execution_descriptors (const std::vector< const RelAlgNode *> &ra_nodes)
 

Function Documentation

◆ get_execution_descriptors() [1/2]

std::vector<RaExecutionDesc> get_execution_descriptors ( const RelAlgNode ra_node)

Definition at line 145 of file RelAlgExecutionDescriptor.cpp.

References CHECK, and anonymous_namespace{RelAlgExecutionDescriptor.cpp}::schedule_ra_dag().

Referenced by RelAlgExecutor::executeRelAlgQueryNoRetry(), and RelAlgExecutor::executeRelAlgSubQuery().

145  {
146  CHECK(ra_node);
147  if (dynamic_cast<const RelScan*>(ra_node) || dynamic_cast<const RelJoin*>(ra_node)) {
148  throw std::runtime_error("Query not supported yet");
149  }
150 
151  std::vector<RaExecutionDesc> descs;
152  for (const auto node : schedule_ra_dag(ra_node)) {
153  if (dynamic_cast<const RelScan*>(node)) {
154  continue;
155  }
156  descs.emplace_back(node);
157  }
158 
159  return descs;
160 }
std::vector< const RelAlgNode * > schedule_ra_dag(const RelAlgNode *sink)
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_execution_descriptors() [2/2]

std::vector<RaExecutionDesc> get_execution_descriptors ( const std::vector< const RelAlgNode *> &  ra_nodes)

Definition at line 162 of file RelAlgExecutionDescriptor.cpp.

References CHECK, and CHECK_GT.

163  {
164  CHECK(!ra_nodes.empty());
165 
166  std::vector<RaExecutionDesc> descs;
167  for (const auto node : ra_nodes) {
168  if (dynamic_cast<const RelScan*>(node)) {
169  continue;
170  }
171  CHECK_GT(node->inputCount(), size_t(0));
172  descs.emplace_back(node);
173  }
174 
175  return descs;
176 }
#define CHECK_GT(x, y)
Definition: Logger.h:199
#define CHECK(condition)
Definition: Logger.h:187