Class AggSpecSum

All Implemented Interfaces:
AggSpec

@Immutable public abstract class AggSpecSum extends AggSpecEmptyBase
Specifies an aggregation that outputs the sum of input values for each group. Only works with numeric input types and Boolean.

Boolean inputs are aggregated according to the following rules:

  • If any input value is true, the output value is true
  • If there are no non-null input values, the output value is null
  • Else all input values must be false, and the output value is false
See Also:
  • Constructor Details

    • AggSpecSum

      public AggSpecSum()
  • Method Details

    • of

      public static AggSpecSum of()
    • description

      public final String description()
      Description copied from interface: AggSpec
      Get a simple description for this AggSpec.
      Returns:
      The description
    • walk

      public final <V extends AggSpec.Visitor> V walk(V visitor)
      Description copied from interface: AggSpec
      Glue method to deliver this AggSpec to a AggSpec.Visitor.
      Parameters:
      visitor - The visitor
      Returns:
      The visitor