OmniSciDB  29e35f4d58
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 visitWindowFunctionOperator (const RexWindowFunctionOperator *rex_window_function_operator) const
RetType visitCase (const RexCase *rex_case) const override

Detailed Description

Definition at line 1179 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 1181 of file RelAlgOptimizer.cpp.

1183  : 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 1185 of file RelAlgOptimizer.cpp.

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

1185  {
1186  CHECK_EQ(target_->inputCount(), size_t(1));
1187  CHECK_EQ(target_->getInput(0), input->getSourceNode());
1188  auto idx_it = old_to_new_in_idx_.find(input->getIndex());
1189  CHECK(idx_it != old_to_new_in_idx_.end());
1190  return boost::make_unique<RexInput>(target_, idx_it->second);
1191  }
#define CHECK_EQ(x, y)
Definition: Logger.h:201
const RelAlgNode * getSourceNode() const
const std::unordered_map< size_t, size_t > & old_to_new_in_idx_
unsigned getIndex() const
const size_t inputCount() const
#define CHECK(condition)
Definition: Logger.h:193
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 1194 of file RelAlgOptimizer.cpp.

◆ target_

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

Definition at line 1195 of file RelAlgOptimizer.cpp.

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