OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{RelAlgOptimizer.cpp}::SubConditionReplacer Class Reference
+ Inheritance diagram for anonymous_namespace{RelAlgOptimizer.cpp}::SubConditionReplacer:
+ Collaboration diagram for anonymous_namespace{RelAlgOptimizer.cpp}::SubConditionReplacer:

Public Member Functions

 SubConditionReplacer (const std::unordered_map< size_t, std::unique_ptr< const RexScalar >> &idx_to_sub_condition)
RetType visitInput (const RexInput *input) const override
- Public Member Functions inherited from RexVisitorBase< std::unique_ptr< const RexScalar > >
virtual std::unique_ptr< const
visit (const RexScalar *rex_scalar) const

Private Attributes

const std::unordered_map
< size_t, std::unique_ptr
< const RexScalar > > & 

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

Constructor & Destructor Documentation

anonymous_namespace{RelAlgOptimizer.cpp}::SubConditionReplacer::SubConditionReplacer ( const std::unordered_map< size_t, std::unique_ptr< const RexScalar >> &  idx_to_sub_condition)

Definition at line 1303 of file RelAlgOptimizer.cpp.

1305  : idx_to_subcond_(idx_to_sub_condition) {}
const std::unordered_map< size_t, std::unique_ptr< const RexScalar > > & idx_to_subcond_

Member Function Documentation

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

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

Definition at line 1306 of file RelAlgOptimizer.cpp.

References RexAbstractInput::getIndex(), RexVisitorBase< std::unique_ptr< const RexScalar > >::visit(), and RexDeepCopyVisitor::visitInput().

1306  {
1307  auto subcond_it = idx_to_subcond_.find(input->getIndex());
1308  if (subcond_it != idx_to_subcond_.end()) {
1309  return RexDeepCopyVisitor::visit(subcond_it->second.get());
1310  }
1311  return RexDeepCopyVisitor::visitInput(input);
1312  }
virtual std::unique_ptr< const RexScalar > visit(const RexScalar *rex_scalar) const
Definition: RexVisitor.h:27
unsigned getIndex() const
Definition: RelAlgDag.h:174
RetType visitInput(const RexInput *input) const override
Definition: RexVisitor.h:142
const std::unordered_map< size_t, std::unique_ptr< const RexScalar > > & idx_to_subcond_

+ Here is the call graph for this function:

Member Data Documentation

const std::unordered_map<size_t, std::unique_ptr<const RexScalar> >& anonymous_namespace{RelAlgOptimizer.cpp}::SubConditionReplacer::idx_to_subcond_

Definition at line 1315 of file RelAlgOptimizer.cpp.

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