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

Detailed Description

Definition at line 1509 of file RelAlgOptimizer.cpp.

Constructor & Destructor Documentation

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

Definition at line 1511 of file RelAlgOptimizer.cpp.

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

Member Function Documentation

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

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

Definition at line 1513 of file RelAlgOptimizer.cpp.

References kBOOLEAN, sub_conditions_, and RexDeepCopyVisitor::visitOperator().

1513  {
1514  if (sub_conditions_.count(rex_operator)) {
1515  return boost::make_unique<RexLiteral>(
1516  true, kBOOLEAN, kBOOLEAN, unsigned(-2147483648), 1, unsigned(-2147483648), 1);
1517  }
1518  return RexDeepCopyVisitor::visitOperator(rex_operator);
1519  }
RetType visitOperator(const RexOperator *rex_operator) const override
Definition: RexVisitor.h:153
std::unordered_set< const RexScalar * > sub_conditions_

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 1522 of file RelAlgOptimizer.cpp.

Referenced by visitOperator().


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