org.apache.cassandra.cql3.functions

## Class AggregateFcts

- java.lang.Object
- - org.apache.cassandra.cql3.functions.AggregateFcts

-     public abstract class AggregateFcts
      extends java.lang.Object

  Factory methods for aggregate functions.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static AggregateFunction` | `avgFunctionForByte` AVG function for byte values (tinyint).
    `static AggregateFunction` | `avgFunctionForCounter` AVG function for counter column values.
    `static AggregateFunction` | `avgFunctionForDecimal` The AVG function for decimal values.
    `static AggregateFunction` | `avgFunctionForDouble` AVG function for double values.
    `static AggregateFunction` | `avgFunctionForFloat` AVG function for float values.
    `static AggregateFunction` | `avgFunctionForInt32` AVG function for int32 values.
    `static AggregateFunction` | `avgFunctionForLong` AVG function for long values.
    `static AggregateFunction` | `avgFunctionForShort` AVG function for for short values (smallint).
    `static AggregateFunction` | `avgFunctionForVarint` The AVG function for varint values.
    `static AggregateFunction` | `countRowsFunction` The function used to count the number of rows of a result set.
    `static AggregateFunction` | `sumFunctionForByte` The SUM function for byte values (tinyint).
    `static AggregateFunction` | `sumFunctionForCounter` The SUM function for counter column values.
    `static AggregateFunction` | `sumFunctionForDecimal` The SUM function for decimal values.
    `static AggregateFunction` | `sumFunctionForDouble` The SUM function for double values.
    `static AggregateFunction` | `sumFunctionForFloat` The SUM function for float values.
    `static AggregateFunction` | `sumFunctionForInt32` The SUM function for int32 values.
    `static AggregateFunction` | `sumFunctionForLong` The SUM function for long values.
    `static AggregateFunction` | `sumFunctionForShort` The SUM function for short values (smallint).
    `static AggregateFunction` | `sumFunctionForVarint` The SUM function for varint values.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AggregateFcts()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isCountRows(Function function)` Checks if the specified function is the count rows (e.g.
    `static AggregateFunction` | `makeCountFunction(AbstractType<?> inputType)` Creates a COUNT function for the specified type.
    `static AggregateFunction` | `makeMaxFunction(AbstractType<?> inputType)` Creates a MAX function for the specified type.
    `static AggregateFunction` | `makeMinFunction(AbstractType<?> inputType)` Creates a MIN function for the specified type.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### countRowsFunction

          public static final AggregateFunction 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 AggregateFunction sumFunctionForDecimal

      The SUM function for decimal values.

    - #### avgFunctionForDecimal

          public static final AggregateFunction avgFunctionForDecimal

      The AVG function for decimal values.

    - #### sumFunctionForVarint

          public static final AggregateFunction sumFunctionForVarint

      The SUM function for varint values.

    - #### avgFunctionForVarint

          public static final AggregateFunction avgFunctionForVarint

      The AVG function for varint values.

    - #### sumFunctionForByte

          public static final AggregateFunction sumFunctionForByte

      The SUM function for byte values (tinyint).

    - #### avgFunctionForByte

          public static final AggregateFunction avgFunctionForByte

      AVG function for byte values (tinyint).

    - #### sumFunctionForShort

          public static final AggregateFunction sumFunctionForShort

      The SUM function for short values (smallint).

    - #### avgFunctionForShort

          public static final AggregateFunction avgFunctionForShort

      AVG function for for short values (smallint).

    - #### sumFunctionForInt32

          public static final AggregateFunction sumFunctionForInt32

      The SUM function for int32 values.

    - #### avgFunctionForInt32

          public static final AggregateFunction avgFunctionForInt32

      AVG function for int32 values.

    - #### sumFunctionForLong

          public static final AggregateFunction sumFunctionForLong

      The SUM function for long values.

    - #### avgFunctionForLong

          public static final AggregateFunction avgFunctionForLong

      AVG function for long values.

    - #### sumFunctionForFloat

          public static final AggregateFunction sumFunctionForFloat

      The SUM function for float values.

    - #### avgFunctionForFloat

          public static final AggregateFunction avgFunctionForFloat

      AVG function for float values.

    - #### sumFunctionForDouble

          public static final AggregateFunction sumFunctionForDouble

      The SUM function for double values.

    - #### avgFunctionForDouble

          public static final AggregateFunction avgFunctionForDouble

      AVG function for double values.

    - #### sumFunctionForCounter

          public static final AggregateFunction sumFunctionForCounter

      The SUM function for counter column values.

    - #### avgFunctionForCounter

          public static final AggregateFunction avgFunctionForCounter

      AVG function for counter column values.

  - ### Constructor Detail

    - #### AggregateFcts

          public AggregateFcts()

  - ### Method Detail

    - #### isCountRows

          public static boolean isCountRows(Function function)

      Checks if the specified function is the count rows (e.g. COUNT(*) or COUNT(1)) function.
      Parameters:
        `function` - the function to check
      Returns:
        `true` if the specified function is the count rows one, `false` otherwise.

    - #### makeMaxFunction

          public static AggregateFunction 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 AggregateFunction 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 AggregateFunction 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.

Copyright © 2018 The Apache Software Foundation