Class AvgWithArgumentCastFunction

  • All Implemented Interfaces:

    public class AvgWithArgumentCastFunction
    extends StandardAnsiSqlAggregationFunctions.AvgFunction
    Some databases strictly return the type of the of the aggregation value for AVG which is problematic in the case of averaging integers because the decimals will be dropped. The usual workaround is to cast the integer argument as some form of double/decimal.
    • Constructor Detail

      • AvgWithArgumentCastFunction

        public AvgWithArgumentCastFunction​(java.lang.String castType)
        Constructs a AvgWithArgumentCastFunction
        castType - The type to cast the avg argument to