OmniSciDB  04ee39c94c
SubConditionRemover Class Reference
+ Inheritance diagram for SubConditionRemover:
+ Collaboration diagram for SubConditionRemover:

Public Member Functions

 SubConditionRemover (const std::vector< const RexScalar *> sub_conds)
 
RetType visitOperator (const RexOperator *rex_operator) 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

std::unordered_set< const RexScalar * > sub_conditions_
 

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

Constructor & Destructor Documentation

◆ SubConditionRemover()

SubConditionRemover::SubConditionRemover ( const std::vector< const RexScalar *>  sub_conds)
inline

Definition at line 1529 of file RelAlgOptimizer.cpp.

1530  : sub_conditions_(sub_conds.begin(), sub_conds.end()) {}
std::unordered_set< const RexScalar * > sub_conditions_

Member Function Documentation

◆ visitOperator()

RetType SubConditionRemover::visitOperator ( const RexOperator rex_operator) const
inlineoverridevirtual

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

Definition at line 1531 of file RelAlgOptimizer.cpp.

References kBOOLEAN, and RexDeepCopyVisitor::visitOperator().

1531  {
1532  if (sub_conditions_.count(rex_operator)) {
1533  return boost::make_unique<RexLiteral>(
1534  true, kBOOLEAN, kBOOLEAN, unsigned(-2147483648), 1, unsigned(-2147483648), 1);
1535  }
1536  return RexDeepCopyVisitor::visitOperator(rex_operator);
1537  }
RetType visitOperator(const RexOperator *rex_operator) const override
Definition: RexVisitor.h:152
std::unordered_set< const RexScalar * > sub_conditions_
+ Here is the call graph for this function:

Member Data Documentation

◆ sub_conditions_

std::unordered_set<const RexScalar*> SubConditionRemover::sub_conditions_
private

Definition at line 1540 of file RelAlgOptimizer.cpp.


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