OmniSciDB  f17484ade4
 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 1342 of file RelAlgExecutor.cpp.

Constructor & Destructor Documentation

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

Definition at line 1344 of file RelAlgExecutor.cpp.

1344 : 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 1378 of file RelAlgExecutor.cpp.

References run_benchmark_import::result.

1380  {
1381  auto result = aggregate;
1382  result.insert(next_result.begin(), next_result.end());
1383  return result;
1384  }
const std::vector<std::shared_ptr<RexInput> >& anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::get_inputs_owned ( ) const
inline

Definition at line 1346 of file RelAlgExecutor.cpp.

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

1346  {
1348  }
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 1350 of file RelAlgExecutor.cpp.

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

1351  {
1352  const auto input_ra = rex_input->getSourceNode();
1353  CHECK(input_ra);
1354  const auto scan_ra = dynamic_cast<const RelScan*>(input_ra);
1355  if (scan_ra) {
1356  const auto td = scan_ra->getTableDescriptor();
1357  if (td) {
1358  const auto col_id = rex_input->getIndex();
1359  const auto cd =
1360  scan_ra->getCatalog().getMetadataForColumnBySpi(td->tableId, col_id + 1);
1361  if (cd && cd->columnType.get_physical_cols() > 0) {
1362  CHECK(IS_GEO(cd->columnType.get_type()));
1363  std::unordered_set<const RexInput*> synthesized_physical_inputs;
1364  for (auto i = 0; i < cd->columnType.get_physical_cols(); i++) {
1365  auto physical_input =
1366  new RexInput(scan_ra, SPIMAP_GEO_PHYSICAL_INPUT(col_id, i));
1367  synthesized_physical_inputs_owned.emplace_back(physical_input);
1368  synthesized_physical_inputs.insert(physical_input);
1369  }
1370  return synthesized_physical_inputs;
1371  }
1372  }
1373  }
1374  return {rex_input};
1375  }
#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 1387 of file RelAlgExecutor.cpp.


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