OmniSciDB  04ee39c94c
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 RexScalarvisit (const RexScalar *rex_scalar) const

Private Attributes

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

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

Constructor & Destructor Documentation

◆ SubConditionReplacer()

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

Definition at line 1214 of file RelAlgOptimizer.cpp.

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

Member Function Documentation

◆ visitInput()

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

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

Definition at line 1217 of file RelAlgOptimizer.cpp.

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

1217  {
1218  auto subcond_it = idx_to_subcond_.find(input->getIndex());
1219  if (subcond_it != idx_to_subcond_.end()) {
1220  return RexDeepCopyVisitor::visit(subcond_it->second.get());
1221  }
1222  return RexDeepCopyVisitor::visitInput(input);
1223  }
RetType visitInput(const RexInput *input) const override
Definition: RexVisitor.h:140
virtual std::unique_ptr< const RexScalar > visit(const RexScalar *rex_scalar) const
Definition: RexVisitor.h:27
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

◆ idx_to_subcond_

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

Definition at line 1226 of file RelAlgOptimizer.cpp.

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