OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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
RexScalar
visit (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 visitWindowFunctionOperator (const RexWindowFunctionOperator *rex_window_function_operator) const
 
RetType visitCase (const RexCase *rex_case) const override
 

Detailed Description

Definition at line 1198 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)
inline

Definition at line 1200 of file RelAlgOptimizer.cpp.

1202  : 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
inlineoverridevirtual

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

Definition at line 1203 of file RelAlgOptimizer.cpp.

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

1203  {
1204  auto subcond_it = idx_to_subcond_.find(input->getIndex());
1205  if (subcond_it != idx_to_subcond_.end()) {
1206  return RexDeepCopyVisitor::visit(subcond_it->second.get());
1207  }
1208  return RexDeepCopyVisitor::visitInput(input);
1209  }
virtual std::unique_ptr< const RexScalar > visit(const RexScalar *rex_scalar) const
Definition: RexVisitor.h:27
unsigned getIndex() const
RetType visitInput(const RexInput *input) const override
Definition: RexVisitor.h:141
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_
private

Definition at line 1212 of file RelAlgOptimizer.cpp.


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