public class ReduceDecimalsRule.DecimalShuttle extends RexShuttle
Modifier and Type | Field and Description |
---|---|
private ReduceDecimalsRule.ExpanderMap |
expanderMap |
private java.util.Map<Pair<RexNode,java.lang.String>,RexNode> |
irreducible |
private java.util.Map<Pair<RexNode,java.lang.String>,RexNode> |
results |
Constructor and Description |
---|
DecimalShuttle(RexBuilder rexBuilder) |
Modifier and Type | Method and Description |
---|---|
private ReduceDecimalsRule.RexExpander |
getExpander(RexCall call)
Returns a
ReduceDecimalsRule.RexExpander for a call |
private RexNode |
lookup(RexNode node)
Lookup registered node
|
private void |
register(RexNode node,
RexNode reducedNode)
Registers node so it will not be computed again
|
private RexNode |
rewriteCall(RexCall call)
Rewrites a call, if required, or returns the original call
|
RexNode |
visitCall(RexCall call)
Rewrites a call in place, from bottom up, as follows:
visit operands
visit call node
rewrite call
visit the rewritten call
|
apply, apply, apply, mutate, visitArray, visitCorrelVariable, visitDynamicParam, visitFieldAccess, visitFieldCollations, visitInputRef, visitList, visitList, visitLiteral, visitLocalRef, visitOver, visitPatternFieldRef, visitRangeRef, visitSubQuery, visitTableInputRef, visitWindow
private final ReduceDecimalsRule.ExpanderMap expanderMap
public DecimalShuttle(RexBuilder rexBuilder)
public RexNode visitCall(RexCall call)
visitCall
in interface RexVisitor<RexNode>
visitCall
in class RexShuttle
private void register(RexNode node, RexNode reducedNode)
private RexNode rewriteCall(RexCall call)
private ReduceDecimalsRule.RexExpander getExpander(RexCall call)
ReduceDecimalsRule.RexExpander
for a callCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.