OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{RelAlgDag.cpp}::RexRebindReindexInputsVisitor Class Reference
+ Inheritance diagram for anonymous_namespace{RelAlgDag.cpp}::RexRebindReindexInputsVisitor:
+ Collaboration diagram for anonymous_namespace{RelAlgDag.cpp}::RexRebindReindexInputsVisitor:

Public Member Functions

 RexRebindReindexInputsVisitor (const RelAlgNode *old_input, const RelAlgNode *new_input, std::unordered_map< unsigned, unsigned > old_to_new_index_map)
void * visitInput (const RexInput *rex_input) const override
- Public Member Functions inherited from anonymous_namespace{RelAlgDag.cpp}::RexRebindInputsVisitor
 RexRebindInputsVisitor (const RelAlgNode *old_input, const RelAlgNode *new_input)
virtual ~RexRebindInputsVisitor ()=default
- Public Member Functions inherited from RexVisitor< void * >
void * visitInput (const RexInput *) const override
void * visitLiteral (const RexLiteral *) const override
void * visitSubQuery (const RexSubQuery *) const override
void * visitRef (const RexRef *) const override
void * visitOperator (const RexOperator *rex_operator) const override
void * visitCase (const RexCase *rex_case) const override
- Public Member Functions inherited from RexVisitorBase< void * >
virtual void * visit (const RexScalar *rex_scalar) const

Private Attributes

const std::unordered_map
< unsigned, unsigned > 

Additional Inherited Members

- Protected Member Functions inherited from RexVisitor< void * >
virtual void * aggregateResult (const void *&aggregate, const void *&next_result) const
void * defaultResult () const override

Detailed Description

Definition at line 104 of file RelAlgDag.cpp.

Constructor & Destructor Documentation

anonymous_namespace{RelAlgDag.cpp}::RexRebindReindexInputsVisitor::RexRebindReindexInputsVisitor ( const RelAlgNode old_input,
const RelAlgNode new_input,
std::unordered_map< unsigned, unsigned >  old_to_new_index_map 

Definition at line 106 of file RelAlgDag.cpp.

110  : RexRebindInputsVisitor(old_input, new_input), mapping_(old_to_new_index_map) {}
const std::unordered_map< unsigned, unsigned > mapping_
Definition: RelAlgDag.cpp:121
RexRebindInputsVisitor(const RelAlgNode *old_input, const RelAlgNode *new_input)
Definition: RelAlgDag.cpp:71

Member Function Documentation

void* anonymous_namespace{RelAlgDag.cpp}::RexRebindReindexInputsVisitor::visitInput ( const RexInput rex_input) const

Reimplemented from anonymous_namespace{RelAlgDag.cpp}::RexRebindInputsVisitor.

Definition at line 112 of file RelAlgDag.cpp.

References CHECK, RexAbstractInput::getIndex(), and RexAbstractInput::setIndex().

112  {
114  auto mapping_itr = mapping_.find(rex_input->getIndex());
115  CHECK(mapping_itr != mapping_.end());
116  rex_input->setIndex(mapping_itr->second);
117  return nullptr;
118  }
void * visitInput(const RexInput *rex_input) const override
Definition: RelAlgDag.cpp:76
unsigned getIndex() const
Definition: RelAlgDag.h:72
void setIndex(const unsigned in_index) const
Definition: RelAlgDag.h:74
const std::unordered_map< unsigned, unsigned > mapping_
Definition: RelAlgDag.cpp:121
#define CHECK(condition)
Definition: Logger.h:222

+ Here is the call graph for this function:

Member Data Documentation

const std::unordered_map<unsigned, unsigned> anonymous_namespace{RelAlgDag.cpp}::RexRebindReindexInputsVisitor::mapping_

Definition at line 121 of file RelAlgDag.cpp.

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