OmniSciDB  a987f07e93
 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 Catalog_Namespace::Catalog &cat)
 
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
 
const Catalog_Namespace::Catalogcat_
 

Detailed Description

Definition at line 1361 of file RelAlgExecutor.cpp.

Constructor & Destructor Documentation

anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::RexUsedInputsVisitor ( const Catalog_Namespace::Catalog cat)
inline

Definition at line 1363 of file RelAlgExecutor.cpp.

1363 : RexVisitor(), cat_(cat) {}

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 1396 of file RelAlgExecutor.cpp.

References run_benchmark_import::result.

1398  {
1399  auto result = aggregate;
1400  result.insert(next_result.begin(), next_result.end());
1401  return result;
1402  }
const std::vector<std::shared_ptr<RexInput> >& anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::get_inputs_owned ( ) const
inline

Definition at line 1365 of file RelAlgExecutor.cpp.

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

1365  {
1367  }
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 1369 of file RelAlgExecutor.cpp.

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

1370  {
1371  const auto input_ra = rex_input->getSourceNode();
1372  CHECK(input_ra);
1373  const auto scan_ra = dynamic_cast<const RelScan*>(input_ra);
1374  if (scan_ra) {
1375  const auto td = scan_ra->getTableDescriptor();
1376  if (td) {
1377  const auto col_id = rex_input->getIndex();
1378  const auto cd = cat_.getMetadataForColumnBySpi(td->tableId, col_id + 1);
1379  if (cd && cd->columnType.get_physical_cols() > 0) {
1380  CHECK(IS_GEO(cd->columnType.get_type()));
1381  std::unordered_set<const RexInput*> synthesized_physical_inputs;
1382  for (auto i = 0; i < cd->columnType.get_physical_cols(); i++) {
1383  auto physical_input =
1384  new RexInput(scan_ra, SPIMAP_GEO_PHYSICAL_INPUT(col_id, i));
1385  synthesized_physical_inputs_owned.emplace_back(physical_input);
1386  synthesized_physical_inputs.insert(physical_input);
1387  }
1388  return synthesized_physical_inputs;
1389  }
1390  }
1391  }
1392  return {rex_input};
1393  }
#define SPIMAP_GEO_PHYSICAL_INPUT(c, i)
Definition: Catalog.h:84
unsigned getIndex() const
Definition: RelAlgDag.h:77
std::vector< std::shared_ptr< RexInput > > synthesized_physical_inputs_owned
const ColumnDescriptor * getMetadataForColumnBySpi(const int tableId, const size_t spi) const
Definition: Catalog.cpp:2083
const RelAlgNode * getSourceNode() const
Definition: RelAlgDag.h:389
#define CHECK(condition)
Definition: Logger.h:289
const TableDescriptor * getTableDescriptor() const
Definition: RelAlgDag.h:982
#define IS_GEO(T)
Definition: sqltypes.h:298

+ Here is the call graph for this function:

Member Data Documentation

const Catalog_Namespace::Catalog& anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::cat_
private

Definition at line 1406 of file RelAlgExecutor.cpp.

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

Definition at line 1405 of file RelAlgExecutor.cpp.


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