OmniSciDB  06b3bd477c
 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 724 of file RelAlgExecutor.cpp.

Constructor & Destructor Documentation

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

Definition at line 726 of file RelAlgExecutor.cpp.

726 : 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 759 of file RelAlgExecutor.cpp.

References run_benchmark_import::result.

761  {
762  auto result = aggregate;
763  result.insert(next_result.begin(), next_result.end());
764  return result;
765  }
const std::vector<std::shared_ptr<RexInput> >& anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::get_inputs_owned ( ) const
inline

Definition at line 728 of file RelAlgExecutor.cpp.

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

728  {
730  }
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 732 of file RelAlgExecutor.cpp.

References RelAlgExecutor::cat_, CHECK(), RexAbstractInput::getIndex(), Catalog_Namespace::Catalog::getMetadataForColumnBySpi(), RexInput::getSourceNode(), RelScan::getTableDescriptor(), IS_GEO, and SPIMAP_GEO_PHYSICAL_INPUT.

733  {
734  const auto input_ra = rex_input->getSourceNode();
735  CHECK(input_ra);
736  const auto scan_ra = dynamic_cast<const RelScan*>(input_ra);
737  if (scan_ra) {
738  const auto td = scan_ra->getTableDescriptor();
739  if (td) {
740  const auto col_id = rex_input->getIndex();
741  const auto cd = cat_.getMetadataForColumnBySpi(td->tableId, col_id + 1);
742  if (cd && cd->columnType.get_physical_cols() > 0) {
743  CHECK(IS_GEO(cd->columnType.get_type()));
744  std::unordered_set<const RexInput*> synthesized_physical_inputs;
745  for (auto i = 0; i < cd->columnType.get_physical_cols(); i++) {
746  auto physical_input =
747  new RexInput(scan_ra, SPIMAP_GEO_PHYSICAL_INPUT(col_id, i));
748  synthesized_physical_inputs_owned.emplace_back(physical_input);
749  synthesized_physical_inputs.insert(physical_input);
750  }
751  return synthesized_physical_inputs;
752  }
753  }
754  }
755  return {rex_input};
756  }
#define SPIMAP_GEO_PHYSICAL_INPUT(c, i)
Definition: Catalog.h:75
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:1545
const RelAlgNode * getSourceNode() const
const TableDescriptor * getTableDescriptor() const
#define IS_GEO(T)
Definition: sqltypes.h:173

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

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

Definition at line 768 of file RelAlgExecutor.cpp.


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