Class RewriteCombineBinaryOperators
java.lang.Object
org.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
org.apache.drill.exec.planner.logical.partition.RewriteCombineBinaryOperators
- All Implemented Interfaces:
org.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
public class RewriteCombineBinaryOperators
extends org.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
Rewrites an expression tree, replacing chained OR and AND operators with a single N-ary operator
e.g.
OR(A, OR(B, C)) ---> OR(A, B, C)
-
Field Summary
Fields inherited from class org.apache.calcite.rex.RexVisitorImpl
deep
-
Constructor Summary
ConstructorDescriptionRewriteCombineBinaryOperators
(boolean deep, org.apache.calcite.rex.RexBuilder builder) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.rex.RexNode
visitCall
(org.apache.calcite.rex.RexCall call) org.apache.calcite.rex.RexNode
visitCorrelVariable
(org.apache.calcite.rex.RexCorrelVariable correlVariable) org.apache.calcite.rex.RexNode
visitDynamicParam
(org.apache.calcite.rex.RexDynamicParam dynamicParam) org.apache.calcite.rex.RexNode
visitFieldAccess
(org.apache.calcite.rex.RexFieldAccess fieldAccess) org.apache.calcite.rex.RexNode
visitInputRef
(org.apache.calcite.rex.RexInputRef inputRef) org.apache.calcite.rex.RexNode
visitLiteral
(org.apache.calcite.rex.RexLiteral literal) org.apache.calcite.rex.RexNode
visitLocalRef
(org.apache.calcite.rex.RexLocalRef localRef) org.apache.calcite.rex.RexNode
visitOver
(org.apache.calcite.rex.RexOver over) org.apache.calcite.rex.RexNode
visitRangeRef
(org.apache.calcite.rex.RexRangeRef rangeRef) Methods inherited from class org.apache.calcite.rex.RexVisitorImpl
visitArrayAnd, visitArrayOr, visitPatternFieldRef, visitSubQuery, visitTableInputRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.calcite.rex.RexVisitor
visitEach, visitList, visitList
-
Constructor Details
-
RewriteCombineBinaryOperators
public RewriteCombineBinaryOperators(boolean deep, org.apache.calcite.rex.RexBuilder builder)
-
-
Method Details
-
visitInputRef
public org.apache.calcite.rex.RexNode visitInputRef(org.apache.calcite.rex.RexInputRef inputRef) - Specified by:
visitInputRef
in interfaceorg.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
- Overrides:
visitInputRef
in classorg.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
-
visitLiteral
public org.apache.calcite.rex.RexNode visitLiteral(org.apache.calcite.rex.RexLiteral literal) - Specified by:
visitLiteral
in interfaceorg.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
- Overrides:
visitLiteral
in classorg.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
-
visitOver
public org.apache.calcite.rex.RexNode visitOver(org.apache.calcite.rex.RexOver over) - Specified by:
visitOver
in interfaceorg.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
- Overrides:
visitOver
in classorg.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
-
visitCorrelVariable
public org.apache.calcite.rex.RexNode visitCorrelVariable(org.apache.calcite.rex.RexCorrelVariable correlVariable) - Specified by:
visitCorrelVariable
in interfaceorg.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
- Overrides:
visitCorrelVariable
in classorg.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
-
visitCall
public org.apache.calcite.rex.RexNode visitCall(org.apache.calcite.rex.RexCall call) - Specified by:
visitCall
in interfaceorg.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
- Overrides:
visitCall
in classorg.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
-
visitDynamicParam
public org.apache.calcite.rex.RexNode visitDynamicParam(org.apache.calcite.rex.RexDynamicParam dynamicParam) - Specified by:
visitDynamicParam
in interfaceorg.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
- Overrides:
visitDynamicParam
in classorg.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
-
visitRangeRef
public org.apache.calcite.rex.RexNode visitRangeRef(org.apache.calcite.rex.RexRangeRef rangeRef) - Specified by:
visitRangeRef
in interfaceorg.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
- Overrides:
visitRangeRef
in classorg.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
-
visitFieldAccess
public org.apache.calcite.rex.RexNode visitFieldAccess(org.apache.calcite.rex.RexFieldAccess fieldAccess) - Specified by:
visitFieldAccess
in interfaceorg.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
- Overrides:
visitFieldAccess
in classorg.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
-
visitLocalRef
public org.apache.calcite.rex.RexNode visitLocalRef(org.apache.calcite.rex.RexLocalRef localRef) - Specified by:
visitLocalRef
in interfaceorg.apache.calcite.rex.RexVisitor<org.apache.calcite.rex.RexNode>
- Overrides:
visitLocalRef
in classorg.apache.calcite.rex.RexVisitorImpl<org.apache.calcite.rex.RexNode>
-