Package org.apache.calcite.rex
Class RexUtil.ExpressionNormalizer
- java.lang.Object
-
- org.apache.calcite.rex.RexVisitorImpl<RexNode>
-
- org.apache.calcite.rex.RexUtil.ExpressionNormalizer
-
- All Implemented Interfaces:
RexVisitor<RexNode>
- Enclosing class:
- RexUtil
private static class RexUtil.ExpressionNormalizer extends RexVisitorImpl<RexNode>
Walks over expressions and builds a bank of common sub-expressions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RexUtil.ExpressionNormalizer.SubExprExistsException
Thrown if there is a sub-expression.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExpressionNormalizer(boolean allowDups)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RexNode
lookup(RexNode expr)
protected RexNode
register(RexNode expr)
RexNode
visitCall(RexCall call)
RexNode
visitCorrelVariable(RexCorrelVariable correlVariable)
RexNode
visitDynamicParam(RexDynamicParam dynamicParam)
RexNode
visitFieldAccess(RexFieldAccess fieldAccess)
RexNode
visitInputRef(RexInputRef inputRef)
RexNode
visitLiteral(RexLiteral literal)
RexNode
visitRangeRef(RexRangeRef rangeRef)
-
Methods inherited from class org.apache.calcite.rex.RexVisitorImpl
visitArrayAnd, visitArrayOr, visitLocalRef, visitOver, visitPatternFieldRef, visitSubQuery, visitTableInputRef
-
-
-
-
Method Detail
-
visitInputRef
public RexNode visitInputRef(RexInputRef inputRef)
- Specified by:
visitInputRef
in interfaceRexVisitor<RexNode>
- Overrides:
visitInputRef
in classRexVisitorImpl<RexNode>
-
visitLiteral
public RexNode visitLiteral(RexLiteral literal)
- Specified by:
visitLiteral
in interfaceRexVisitor<RexNode>
- Overrides:
visitLiteral
in classRexVisitorImpl<RexNode>
-
visitCorrelVariable
public RexNode visitCorrelVariable(RexCorrelVariable correlVariable)
- Specified by:
visitCorrelVariable
in interfaceRexVisitor<RexNode>
- Overrides:
visitCorrelVariable
in classRexVisitorImpl<RexNode>
-
visitCall
public RexNode visitCall(RexCall call)
- Specified by:
visitCall
in interfaceRexVisitor<RexNode>
- Overrides:
visitCall
in classRexVisitorImpl<RexNode>
-
visitDynamicParam
public RexNode visitDynamicParam(RexDynamicParam dynamicParam)
- Specified by:
visitDynamicParam
in interfaceRexVisitor<RexNode>
- Overrides:
visitDynamicParam
in classRexVisitorImpl<RexNode>
-
visitRangeRef
public RexNode visitRangeRef(RexRangeRef rangeRef)
- Specified by:
visitRangeRef
in interfaceRexVisitor<RexNode>
- Overrides:
visitRangeRef
in classRexVisitorImpl<RexNode>
-
visitFieldAccess
public RexNode visitFieldAccess(RexFieldAccess fieldAccess)
- Specified by:
visitFieldAccess
in interfaceRexVisitor<RexNode>
- Overrides:
visitFieldAccess
in classRexVisitorImpl<RexNode>
-
-