OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
RexScalar
visit (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

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

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

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

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:198
unsigned getIndex() const
CHECK(cgen_state)
const std::unordered_map< size_t, size_t > & old_to_new_in_idx_
const RelAlgNode * getInput(const size_t idx) const
const RelAlgNode * getSourceNode() const
const size_t inputCount() const

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 1194 of file RelAlgOptimizer.cpp.

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

Definition at line 1195 of file RelAlgOptimizer.cpp.


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