org.eigenbase.rel.rules
Class ReduceDecimalsRule.BinaryArithmeticExpander
java.lang.Object
org.eigenbase.rel.rules.ReduceDecimalsRule.RexExpander
org.eigenbase.rel.rules.ReduceDecimalsRule.BinaryArithmeticExpander
- Enclosing class:
- ReduceDecimalsRule
private class ReduceDecimalsRule.BinaryArithmeticExpander
- extends ReduceDecimalsRule.RexExpander
Expands a decimal arithmetic expression
Methods inherited from class org.eigenbase.rel.rules.ReduceDecimalsRule.RexExpander |
accessValue, canExpand, decodeValue, encodeValue, encodeValue, ensureScale, ensureType, ensureType, makeApproxLiteral, makeApproxScaleFactor, makeCase, makeCase, makeDivide, makeExactLiteral, makeIsNegative, makeIsPositive, makeMinus, makeMultiply, makePlus, makeRoundFactor, makeScaleFactor, matchNullability, powerOfTen, scaleDown, scaleDownDouble, scaleUp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
typeA
RelDataType typeA
typeB
RelDataType typeB
scaleA
int scaleA
scaleB
int scaleB
ReduceDecimalsRule.BinaryArithmeticExpander
private ReduceDecimalsRule.BinaryArithmeticExpander(RexBuilder builder)
expand
public RexNode expand(RexCall call)
- Description copied from class:
ReduceDecimalsRule.RexExpander
- Rewrites an expression containing decimals. Normally, this method
always performs a rewrite, but implementations may choose to return
the original expression if no change was required.
- Specified by:
expand
in class ReduceDecimalsRule.RexExpander
analyzeOperands
private void analyzeOperands(RexNode[] operands)
- Convenience method for reading characteristics of operands (such as
scale, precision, whole digits) into an ArithmeticExpander. The
operands are restricted by the following contraints:
- there are exactly two operands
- both are exact numeric types
expandPlusMinus
private RexNode expandPlusMinus(RexCall call,
RexNode[] operands)
expandDivide
private RexNode expandDivide(RexCall call,
RexNode[] operands)
expandTimes
private RexNode expandTimes(RexCall call,
RexNode[] operands)
expandComparison
private RexNode expandComparison(RexCall call,
RexNode[] operands)
expandMod
private RexNode expandMod(RexCall call,
RexNode[] operands)