OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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

- Public Types inherited from RexDeepCopyVisitor
using RowValues = std::vector< std::unique_ptr< const RexScalar >>
 
- Static Public Member Functions inherited from RexDeepCopyVisitor
static std::vector< RowValuescopy (std::vector< RowValues > const &rhs)
 
- 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 1282 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 1284 of file RelAlgOptimizer.cpp.

1286  : 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 1288 of file RelAlgOptimizer.cpp.

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

1288  {
1289  CHECK_EQ(target_->inputCount(), size_t(1));
1290  CHECK_EQ(target_->getInput(0), input->getSourceNode());
1291  auto idx_it = old_to_new_in_idx_.find(input->getIndex());
1292  CHECK(idx_it != old_to_new_in_idx_.end());
1293  return boost::make_unique<RexInput>(target_, idx_it->second);
1294  }
#define CHECK_EQ(x, y)
Definition: Logger.h:301
unsigned getIndex() const
Definition: RelAlgDag.h:174
const std::unordered_map< size_t, size_t > & old_to_new_in_idx_
const RelAlgNode * getInput(const size_t idx) const
Definition: RelAlgDag.h:877
const RelAlgNode * getSourceNode() const
Definition: RelAlgDag.h:1056
#define CHECK(condition)
Definition: Logger.h:291
const size_t inputCount() const
Definition: RelAlgDag.h:875

+ 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 1297 of file RelAlgOptimizer.cpp.

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

Definition at line 1298 of file RelAlgOptimizer.cpp.


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