OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{QueryPlanDagExtractor.cpp} Namespace Reference

Classes

struct  IsEquivBinOp
 
struct  OpInfo
 

Functions

int get_input_idx (const RelLeftDeepInnerJoin *rel_left_deep_join, const shared::TableKey &table_key)
 

Function Documentation

int anonymous_namespace{QueryPlanDagExtractor.cpp}::get_input_idx ( const RelLeftDeepInnerJoin rel_left_deep_join,
const shared::TableKey table_key 
)

Definition at line 396 of file QueryPlanDagExtractor.cpp.

References shared::TableKey::db_id, RelAlgNode::getInput(), and RelAlgNode::inputCount().

397  {
398  for (size_t input_idx = 0; input_idx < rel_left_deep_join->inputCount(); ++input_idx) {
399  auto const input_node = rel_left_deep_join->getInput(input_idx);
400  auto const scan_node = dynamic_cast<const RelScan*>(input_node);
401  shared::TableKey target_table_key{0, 0};
402  if (scan_node) {
403  target_table_key.db_id = scan_node->getCatalog().getDatabaseId();
404  target_table_key.table_id = scan_node->getTableDescriptor()->tableId;
405  } else {
406  target_table_key.table_id = -1 * input_node->getId(); // temporary table
407  }
408  if (target_table_key == table_key) {
409  return input_idx;
410  }
411  }
412  return -1;
413 }
const RelAlgNode * getInput(const size_t idx) const
Definition: RelAlgDag.h:877
const size_t inputCount() const
Definition: RelAlgDag.h:875

+ Here is the call graph for this function: