OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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
 
- Public Member Functions inherited from RexVisitor< std::unordered_set< const RexInput * > >
std::unordered_set< const
RexInput * > 
visitInput (const RexInput *) const override
 
std::unordered_set< const
RexInput * > 
visitLiteral (const RexLiteral *) const override
 
std::unordered_set< const
RexInput * > 
visitSubQuery (const RexSubQuery *) const override
 
std::unordered_set< const
RexInput * > 
visitRef (const RexRef *) const override
 
std::unordered_set< const
RexInput * > 
visitOperator (const RexOperator *rex_operator) const override
 
std::unordered_set< const
RexInput * > 
visitCase (const RexCase *rex_case) const override
 
- Public Member Functions inherited from RexVisitorBase< std::unordered_set< const RexInput * > >
virtual std::unordered_set
< const RexInput * > 
visit (const RexScalar *rex_scalar) const
 

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
 
- Protected Member Functions inherited from RexVisitor< std::unordered_set< const RexInput * > >
std::unordered_set< const
RexInput * > 
defaultResult () const override
 

Private Attributes

std::vector< std::shared_ptr
< RexInput > > 
synthesized_physical_inputs_owned
 
const Catalog_Namespace::Catalogcat_
 

Detailed Description

Definition at line 442 of file RelAlgExecutor.cpp.

Constructor & Destructor Documentation

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

Definition at line 444 of file RelAlgExecutor.cpp.

444 : 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
inlineoverrideprotectedvirtual

Reimplemented from RexVisitor< std::unordered_set< const RexInput * > >.

Definition at line 477 of file RelAlgExecutor.cpp.

References run_benchmark_import::result.

479  {
480  auto result = aggregate;
481  result.insert(next_result.begin(), next_result.end());
482  return result;
483  }
const std::vector<std::shared_ptr<RexInput> >& anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::get_inputs_owned ( ) const
inline

Definition at line 446 of file RelAlgExecutor.cpp.

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

446  {
448  }
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
inlineoverridevirtual

Implements RexVisitorBase< std::unordered_set< const RexInput * > >.

Definition at line 450 of file RelAlgExecutor.cpp.

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

451  {
452  const auto input_ra = rex_input->getSourceNode();
453  CHECK(input_ra);
454  const auto scan_ra = dynamic_cast<const RelScan*>(input_ra);
455  if (scan_ra) {
456  const auto td = scan_ra->getTableDescriptor();
457  if (td) {
458  const auto col_id = rex_input->getIndex();
459  const auto cd = cat_.getMetadataForColumnBySpi(td->tableId, col_id + 1);
460  if (cd && cd->columnType.get_physical_cols() > 0) {
461  CHECK(IS_GEO(cd->columnType.get_type()));
462  std::unordered_set<const RexInput*> synthesized_physical_inputs;
463  for (auto i = 0; i < cd->columnType.get_physical_cols(); i++) {
464  auto physical_input =
465  new RexInput(scan_ra, SPIMAP_GEO_PHYSICAL_INPUT(col_id, i));
466  synthesized_physical_inputs_owned.emplace_back(physical_input);
467  synthesized_physical_inputs.insert(physical_input);
468  }
469  return synthesized_physical_inputs;
470  }
471  }
472  }
473  return {rex_input};
474  }
#define SPIMAP_GEO_PHYSICAL_INPUT(c, i)
Definition: Catalog.h:70
unsigned getIndex() const
CHECK(cgen_state)
std::vector< std::shared_ptr< RexInput > > synthesized_physical_inputs_owned
const ColumnDescriptor * getMetadataForColumnBySpi(const int tableId, const size_t spi) const
Definition: Catalog.cpp:1437
const RelAlgNode * getSourceNode() const
const TableDescriptor * getTableDescriptor() const
#define IS_GEO(T)
Definition: sqltypes.h:167

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

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

Definition at line 486 of file RelAlgExecutor.cpp.


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