OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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

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

Constructor & Destructor Documentation

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

Definition at line 1620 of file RelAlgOptimizer.cpp.

1621  : 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 1622 of file RelAlgOptimizer.cpp.

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

1622  {
1623  if (sub_conditions_.count(rex_operator)) {
1624  return boost::make_unique<RexLiteral>(
1625  true, kBOOLEAN, kBOOLEAN, unsigned(-2147483648), 1, unsigned(-2147483648), 1);
1626  }
1627  return RexDeepCopyVisitor::visitOperator(rex_operator);
1628  }
RetType visitOperator(const RexOperator *rex_operator) const override
Definition: RexVisitor.h:154
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 1631 of file RelAlgOptimizer.cpp.

Referenced by visitOperator().


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