OmniSciDB  72c90bc290
 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 1343 of file RelAlgExecutor.cpp.

Constructor & Destructor Documentation

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

Definition at line 1345 of file RelAlgExecutor.cpp.

1345 : 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 1379 of file RelAlgExecutor.cpp.

References run_benchmark_import::result.

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

Definition at line 1347 of file RelAlgExecutor.cpp.

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

1347  {
1349  }
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 1351 of file RelAlgExecutor.cpp.

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

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


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