private class ReduceDecimalsRule.ReinterpretExpander extends ReduceDecimalsRule.RexExpander
builder, int8, real8| Modifier | Constructor and Description |
|---|---|
private |
ReinterpretExpander(RexBuilder builder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExpand(RexCall call)
This defaults to the utility method,
RexUtil.requiresDecimalExpansion(RexNode, boolean) which checks
general guidelines on whether a rewrite should be considered at all. |
private boolean |
canSimplify(RexCall outer,
RexCall inner,
RexNode value)
Detect, in a generic, but strict way, whether it is possible to
simplify a reinterpret cast.
|
RexNode |
expand(RexCall call)
Rewrites an expression containing decimals.
|
accessValue, decodeValue, encodeValue, encodeValue, ensureScale, ensureType, ensureType, makeApproxLiteral, makeApproxScaleFactor, makeCase, makeCase, makeDivide, makeExactLiteral, makeIsNegative, makeIsPositive, makeMinus, makeMultiply, makePlus, makeRoundFactor, makeScaleFactor, powerOfTen, scaleDown, scaleDownDouble, scaleUpprivate ReinterpretExpander(RexBuilder builder)
public boolean canExpand(RexCall call)
ReduceDecimalsRule.RexExpanderRexUtil.requiresDecimalExpansion(RexNode, boolean) which checks
general guidelines on whether a rewrite should be considered at all. In
general, it is helpful to update the utility method since that method is
often used to filter the somewhat expensive rewrite process.
However, this method provides another place for implementations of RexExpander to make a more detailed analysis before deciding on whether to perform a rewrite.
canExpand in class ReduceDecimalsRule.RexExpanderpublic RexNode expand(RexCall call)
ReduceDecimalsRule.RexExpanderexpand in class ReduceDecimalsRule.RexExpanderprivate boolean canSimplify(RexCall outer, RexCall inner, RexNode value)
outer - outer call to reinterpretinner - inner call to reinterpretvalue - inner valueCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.