Class NumericResolver


  • public class NumericResolver
    extends Resolver
    This Resolver is responsible to return the numeric type for a list of Resolvers.

    The result of a CASE expression, COALESCE expression, NULLIF expression, or arithmetic expression (+, -, *, /) is determined by applying the following rule to its operands.

    • If there is an operand of type Double or double, the result of the operation is of type Double;
    • otherwise, if there is an operand of type Float or float, the result of the operation is of type Float;
    • otherwise, if there is an operand of type BigDecimal, the result of the operation is of type BigDecimal;
    • otherwise, if there is an operand of type BigInteger, the result of the operation is of type BigInteger, unless the operator is / (division), in which case the numeric result type is not further defined;
    • otherwise, if there is an operand of type Long or long, the result of the operation is of type Long, unless the operator is / (division), in which case the numeric result type is not further defined;
    • otherwise, if there is an operand of integral type, the result of the operation is of type Integer, unless the operator is / (division), in which case the numeric result type is not further defined.
    Version:
    2.5
    Author:
    Pascal Filion
    Since:
    2.3