Class AggregateFcts


  • public abstract class AggregateFcts
    extends java.lang.Object
    Factory methods for aggregate functions.
    • Field Detail

      • countRowsFunction

        public static final AggregateFcts.CountRowsFunction countRowsFunction
        The function used to count the number of rows of a result set. This function is called when COUNT(*) or COUNT(1) is specified.
      • sumFunctionForDecimal

        public static final NativeAggregateFunction sumFunctionForDecimal
        The SUM function for decimal values.
      • avgFunctionForDecimal

        public static final NativeAggregateFunction avgFunctionForDecimal
        The AVG function for decimal values.

        The average of an empty value set returns zero.
      • sumFunctionForVarint

        public static final NativeAggregateFunction sumFunctionForVarint
        The SUM function for varint values.
      • avgFunctionForVarint

        public static final NativeAggregateFunction avgFunctionForVarint
        The AVG function for varint values.

        The average of an empty value set returns zero. The returned value is of the same type as the input values, so the returned average won't have a decimal part.
      • sumFunctionForByte

        public static final NativeAggregateFunction sumFunctionForByte
        The SUM function for byte values (tinyint).

        The returned value is of the same type as the input values, so there is a risk of overflow if the sum of the values exceeds the maximum value that the type can represent.
      • avgFunctionForByte

        public static final NativeAggregateFunction avgFunctionForByte
        AVG function for byte values (tinyint).

        The average of an empty value set returns zero. The returned value is of the same type as the input values, so the returned average won't have a decimal part.
      • sumFunctionForShort

        public static final NativeAggregateFunction sumFunctionForShort
        The SUM function for short values (smallint).

        The returned value is of the same type as the input values, so there is a risk of overflow if the sum of the values exceeds the maximum value that the type can represent.
      • avgFunctionForShort

        public static final NativeAggregateFunction avgFunctionForShort
        AVG function for for short values (smallint).

        The average of an empty value set returns zero. The returned value is of the same type as the input values, so the returned average won't have a decimal part.
      • sumFunctionForInt32

        public static final NativeAggregateFunction sumFunctionForInt32
        The SUM function for int32 values.

        The returned value is of the same type as the input values, so there is a risk of overflow if the sum of the values exceeds the maximum value that the type can represent.
      • avgFunctionForInt32

        public static final NativeAggregateFunction avgFunctionForInt32
        AVG function for int32 values.

        The average of an empty value set returns zero. The returned value is of the same type as the input values, so the returned average won't have a decimal part.
      • sumFunctionForLong

        public static final NativeAggregateFunction sumFunctionForLong
        The SUM function for long values.

        The returned value is of the same type as the input values, so there is a risk of overflow if the sum of the values exceeds the maximum value that the type can represent.
      • avgFunctionForLong

        public static final NativeAggregateFunction avgFunctionForLong
        AVG function for long values.

        The average of an empty value set returns zero. The returned value is of the same type as the input values, so the returned average won't have a decimal part.
      • sumFunctionForFloat

        public static final NativeAggregateFunction sumFunctionForFloat
        The SUM function for float values.

        The returned value is of the same type as the input values, so there is a risk of overflow if the sum of the values exceeds the maximum value that the type can represent.
      • avgFunctionForFloat

        public static final NativeAggregateFunction avgFunctionForFloat
        AVG function for float values.

        The average of an empty value set returns zero.
      • sumFunctionForDouble

        public static final NativeAggregateFunction sumFunctionForDouble
        The SUM function for double values.

        The returned value is of the same type as the input values, so there is a risk of overflow if the sum of the values exceeds the maximum value that the type can represent.
      • avgFunctionForDouble

        public static final NativeAggregateFunction avgFunctionForDouble
        AVG function for double values.

        The average of an empty value set returns zero.
      • sumFunctionForCounter

        public static final NativeAggregateFunction sumFunctionForCounter
        The SUM function for counter column values.
      • avgFunctionForCounter

        public static final NativeAggregateFunction avgFunctionForCounter
        AVG function for counter column values.
      • minFunctionForCounter

        public static final NativeAggregateFunction minFunctionForCounter
        The MIN function for counter column values.
      • maxFunctionForCounter

        public static final NativeAggregateFunction maxFunctionForCounter
        MAX function for counter column values.
    • Constructor Detail

      • AggregateFcts

        public AggregateFcts()
    • Method Detail

      • addFunctionsTo

        public static void addFunctionsTo​(NativeFunctions functions)
      • makeMaxFunction

        public static NativeAggregateFunction makeMaxFunction​(AbstractType<?> inputType)
        Creates a MAX function for the specified type.
        Parameters:
        inputType - the function input and output type
        Returns:
        a MAX function for the specified type.
      • makeMinFunction

        public static NativeAggregateFunction makeMinFunction​(AbstractType<?> inputType)
        Creates a MIN function for the specified type.
        Parameters:
        inputType - the function input and output type
        Returns:
        a MIN function for the specified type.
      • makeCountFunction

        public static NativeAggregateFunction makeCountFunction​(AbstractType<?> inputType)
        Creates a COUNT function for the specified type.
        Parameters:
        inputType - the function input type
        Returns:
        a COUNT function for the specified type.