OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor Class Reference
+ Inheritance diagram for anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor:
+ Collaboration diagram for anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor:

Public Member Functions

 RexUsedInputsVisitor ()
 
const std::vector
< std::shared_ptr< RexInput > > & 
get_inputs_owned () const
 
std::unordered_set< const
RexInput * > 
visitInput (const RexInput *rex_input) const override
 

Protected Member Functions

std::unordered_set< const
RexInput * > 
aggregateResult (const std::unordered_set< const RexInput * > &aggregate, const std::unordered_set< const RexInput * > &next_result) const override
 

Private Attributes

std::vector< std::shared_ptr
< RexInput > > 
synthesized_physical_inputs_owned
 

Detailed Description

Definition at line 1349 of file RelAlgExecutor.cpp.

Constructor & Destructor Documentation

anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::RexUsedInputsVisitor ( )
inline

Definition at line 1351 of file RelAlgExecutor.cpp.

1351 : RexVisitor() {}

Member Function Documentation

std::unordered_set<const RexInput*> anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::aggregateResult ( const std::unordered_set< const RexInput * > &  aggregate,
const std::unordered_set< const RexInput * > &  next_result 
) const
inlineoverrideprotected

Definition at line 1385 of file RelAlgExecutor.cpp.

References run_benchmark_import::result.

1387  {
1388  auto result = aggregate;
1389  result.insert(next_result.begin(), next_result.end());
1390  return result;
1391  }
const std::vector<std::shared_ptr<RexInput> >& anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::get_inputs_owned ( ) const
inline

Definition at line 1353 of file RelAlgExecutor.cpp.

Referenced by anonymous_namespace{RelAlgExecutor.cpp}::get_join_source_used_inputs(), and anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs().

1353  {
1355  }
std::vector< std::shared_ptr< RexInput > > synthesized_physical_inputs_owned

+ Here is the caller graph for this function:

std::unordered_set<const RexInput*> anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::visitInput ( const RexInput rex_input) const
inlineoverride

Definition at line 1357 of file RelAlgExecutor.cpp.

References CHECK, RexAbstractInput::getIndex(), RexInput::getSourceNode(), RelScan::getTableDescriptor(), IS_GEO, and SPIMAP_GEO_PHYSICAL_INPUT.

1358  {
1359  const auto input_ra = rex_input->getSourceNode();
1360  CHECK(input_ra);
1361  const auto scan_ra = dynamic_cast<const RelScan*>(input_ra);
1362  if (scan_ra) {
1363  const auto td = scan_ra->getTableDescriptor();
1364  if (td) {
1365  const auto col_id = rex_input->getIndex();
1366  const auto cd =
1367  scan_ra->getCatalog().getMetadataForColumnBySpi(td->tableId, col_id + 1);
1368  if (cd && cd->columnType.get_physical_cols() > 0) {
1369  CHECK(IS_GEO(cd->columnType.get_type()));
1370  std::unordered_set<const RexInput*> synthesized_physical_inputs;
1371  for (auto i = 0; i < cd->columnType.get_physical_cols(); i++) {
1372  auto physical_input =
1373  new RexInput(scan_ra, SPIMAP_GEO_PHYSICAL_INPUT(col_id, i));
1374  synthesized_physical_inputs_owned.emplace_back(physical_input);
1375  synthesized_physical_inputs.insert(physical_input);
1376  }
1377  return synthesized_physical_inputs;
1378  }
1379  }
1380  }
1381  return {rex_input};
1382  }
#define SPIMAP_GEO_PHYSICAL_INPUT(c, i)
Definition: Catalog.h:84
unsigned getIndex() const
Definition: RelAlgDag.h:174
std::vector< std::shared_ptr< RexInput > > synthesized_physical_inputs_owned
const RelAlgNode * getSourceNode() const
Definition: RelAlgDag.h:1056
#define CHECK(condition)
Definition: Logger.h:291
const TableDescriptor * getTableDescriptor() const
Definition: RelAlgDag.h:1117
#define IS_GEO(T)
Definition: sqltypes.h:310

+ Here is the call graph for this function:

Member Data Documentation

std::vector<std::shared_ptr<RexInput> > anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::synthesized_physical_inputs_owned
mutableprivate

Definition at line 1394 of file RelAlgExecutor.cpp.


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