OmniSciDB  04ee39c94c
anonymous_namespace{RelAlgOptimizer.cpp}::RexInputSinker Class Reference
+ Inheritance diagram for anonymous_namespace{RelAlgOptimizer.cpp}::RexInputSinker:
+ Collaboration diagram for anonymous_namespace{RelAlgOptimizer.cpp}::RexInputSinker:

Public Member Functions

 RexInputSinker (const std::unordered_map< size_t, size_t > &old_to_new_idx, const RelAlgNode *new_src)
RetType visitInput (const RexInput *input) const override
- Public Member Functions inherited from RexVisitorBase< std::unique_ptr< const RexScalar > >
virtual std::unique_ptr< const RexScalarvisit (const RexScalar *rex_scalar) const

Private Attributes

const std::unordered_map< size_t, size_t > & old_to_new_in_idx_
const RelAlgNodetarget_

Additional Inherited Members

- Protected Types inherited from RexDeepCopyVisitor
using RetType = std::unique_ptr< const RexScalar >
- Protected Member Functions inherited from RexDeepCopyVisitor
RetType visitInput (const RexInput *input) const override
RetType visitLiteral (const RexLiteral *literal) const override
RetType visitSubQuery (const RexSubQuery *subquery) const override
RetType visitRef (const RexRef *ref) const override
RetType visitOperator (const RexOperator *rex_operator) const override
RetType visitCase (const RexCase *rex_case) const override

Detailed Description

Definition at line 1193 of file RelAlgOptimizer.cpp.

Constructor & Destructor Documentation

◆ RexInputSinker()

anonymous_namespace{RelAlgOptimizer.cpp}::RexInputSinker::RexInputSinker ( const std::unordered_map< size_t, size_t > &  old_to_new_idx,
const RelAlgNode new_src 

Definition at line 1195 of file RelAlgOptimizer.cpp.

1197  : old_to_new_in_idx_(old_to_new_idx), target_(new_src) {}
const std::unordered_map< size_t, size_t > & old_to_new_in_idx_

Member Function Documentation

◆ visitInput()

RetType anonymous_namespace{RelAlgOptimizer.cpp}::RexInputSinker::visitInput ( const RexInput input) const

Implements RexVisitorBase< std::unique_ptr< const RexScalar > >.

Definition at line 1199 of file RelAlgOptimizer.cpp.

References CHECK, CHECK_EQ, RexAbstractInput::getIndex(), and RexInput::getSourceNode().

1199  {
1200  CHECK_EQ(target_->inputCount(), size_t(1));
1201  CHECK_EQ(target_->getInput(0), input->getSourceNode());
1202  auto idx_it = old_to_new_in_idx_.find(input->getIndex());
1203  CHECK(idx_it != old_to_new_in_idx_.end());
1204  return boost::make_unique<RexInput>(target_, idx_it->second);
1205  }
#define CHECK_EQ(x, y)
Definition: Logger.h:195
const RelAlgNode * getSourceNode() const
const std::unordered_map< size_t, size_t > & old_to_new_in_idx_
const size_t inputCount() const
#define CHECK(condition)
Definition: Logger.h:187
const RelAlgNode * getInput(const size_t idx) const
+ Here is the call graph for this function:

Member Data Documentation

◆ old_to_new_in_idx_

const std::unordered_map<size_t, size_t>& anonymous_namespace{RelAlgOptimizer.cpp}::RexInputSinker::old_to_new_in_idx_

Definition at line 1208 of file RelAlgOptimizer.cpp.

◆ target_

const RelAlgNode* anonymous_namespace{RelAlgOptimizer.cpp}::RexInputSinker::target_

Definition at line 1209 of file RelAlgOptimizer.cpp.

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