net.sf.farrago.query
Class FarragoReduceExpressionsRule.ReducibleExprLocator
java.lang.Object
org.eigenbase.rex.RexVisitorImpl<Void>
net.sf.farrago.query.FarragoReduceExpressionsRule.ReducibleExprLocator
- All Implemented Interfaces:
- RexVisitor<Void>
- Enclosing class:
- FarragoReduceExpressionsRule
private static class FarragoReduceExpressionsRule.ReducibleExprLocator
- extends RexVisitorImpl<Void>
Helper class used to locate expressions that either can be reduced to
literals or contain redundant casts.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
preparingStmt
private final FarragoSessionPreparingStmt preparingStmt
stack
private final List<FarragoReduceExpressionsRule.ReducibleExprLocator.Constancy> stack
constExprs
private final List<RexNode> constExprs
addCasts
private final List<Boolean> addCasts
removableCasts
private final List<RexNode> removableCasts
parentCallTypeStack
private final List<SqlOperator> parentCallTypeStack
FarragoReduceExpressionsRule.ReducibleExprLocator
FarragoReduceExpressionsRule.ReducibleExprLocator(FarragoSessionPreparingStmt preparingStmt,
List<RexNode> constExprs,
List<Boolean> addCasts,
List<RexNode> removableCasts)
analyze
public void analyze(RexNode exp)
pushVariable
private Void pushVariable()
addResult
private void addResult(RexNode exp)
visitInputRef
public Void visitInputRef(RexInputRef inputRef)
- Specified by:
visitInputRef
in interface RexVisitor<Void>
- Overrides:
visitInputRef
in class RexVisitorImpl<Void>
visitLiteral
public Void visitLiteral(RexLiteral literal)
- Specified by:
visitLiteral
in interface RexVisitor<Void>
- Overrides:
visitLiteral
in class RexVisitorImpl<Void>
visitOver
public Void visitOver(RexOver over)
- Specified by:
visitOver
in interface RexVisitor<Void>
- Overrides:
visitOver
in class RexVisitorImpl<Void>
visitCorrelVariable
public Void visitCorrelVariable(RexCorrelVariable correlVariable)
- Specified by:
visitCorrelVariable
in interface RexVisitor<Void>
- Overrides:
visitCorrelVariable
in class RexVisitorImpl<Void>
visitCall
public Void visitCall(RexCall call)
- Specified by:
visitCall
in interface RexVisitor<Void>
- Overrides:
visitCall
in class RexVisitorImpl<Void>
analyzeCall
private void analyzeCall(RexCall call,
FarragoReduceExpressionsRule.ReducibleExprLocator.Constancy callConstancy)
reduceCasts
private void reduceCasts(RexCall outerCast)
visitDynamicParam
public Void visitDynamicParam(RexDynamicParam dynamicParam)
- Specified by:
visitDynamicParam
in interface RexVisitor<Void>
- Overrides:
visitDynamicParam
in class RexVisitorImpl<Void>
visitRangeRef
public Void visitRangeRef(RexRangeRef rangeRef)
- Specified by:
visitRangeRef
in interface RexVisitor<Void>
- Overrides:
visitRangeRef
in class RexVisitorImpl<Void>
visitFieldAccess
public Void visitFieldAccess(RexFieldAccess fieldAccess)
- Specified by:
visitFieldAccess
in interface RexVisitor<Void>
- Overrides:
visitFieldAccess
in class RexVisitorImpl<Void>