OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{RelAlgDagBuilder.cpp}::RexRebindReindexInputsVisitor Class Reference
+ Inheritance diagram for anonymous_namespace{RelAlgDagBuilder.cpp}::RexRebindReindexInputsVisitor:
+ Collaboration diagram for anonymous_namespace{RelAlgDagBuilder.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{RelAlgDagBuilder.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 > 
mapping_
 

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 105 of file RelAlgDagBuilder.cpp.

Constructor & Destructor Documentation

anonymous_namespace{RelAlgDagBuilder.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 RelAlgDagBuilder.cpp.

111  : RexRebindInputsVisitor(old_input, new_input), mapping_(old_to_new_index_map) {}
RexRebindInputsVisitor(const RelAlgNode *old_input, const RelAlgNode *new_input)

Member Function Documentation

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

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

Definition at line 113 of file RelAlgDagBuilder.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  }
unsigned getIndex() const
void setIndex(const unsigned in_index) const
void * visitInput(const RexInput *rex_input) const override
#define CHECK(condition)
Definition: Logger.h:197

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 122 of file RelAlgDagBuilder.cpp.


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