OmniSciDB  72c90bc290
 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
 
void * visitInput (const RexInput *rex_input) const override
 

Private Attributes

const std::unordered_map
< unsigned, unsigned > 
mapping_
 

Detailed Description

Definition at line 105 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 
)
inline

Definition at line 107 of file RelAlgDag.cpp.

111  : RexRebindInputsVisitor(old_input, new_input), mapping_(old_to_new_index_map) {}
const std::unordered_map< unsigned, unsigned > mapping_
Definition: RelAlgDag.cpp:122
RexRebindInputsVisitor(const RelAlgNode *old_input, const RelAlgNode *new_input)
Definition: RelAlgDag.cpp:72

Member Function Documentation

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

Definition at line 113 of file RelAlgDag.cpp.

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

113  {
115  auto mapping_itr = mapping_.find(rex_input->getIndex());
116  CHECK(mapping_itr != mapping_.end());
117  rex_input->setIndex(mapping_itr->second);
118  return nullptr;
119  }
void * visitInput(const RexInput *rex_input) const override
Definition: RelAlgDag.cpp:77
unsigned getIndex() const
Definition: RelAlgDag.h:174
void setIndex(const unsigned in_index) const
Definition: RelAlgDag.h:176
const std::unordered_map< unsigned, unsigned > mapping_
Definition: RelAlgDag.cpp:122
#define CHECK(condition)
Definition: Logger.h:291

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 122 of file RelAlgDag.cpp.


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