Class AggregateOperator

  • All Implemented Interfaces:
    AutoCloseable, Operator<TransferableBlock>

    public class AggregateOperator
    extends MultiStageOperator
    AggregateOperator is used to aggregate values over a set of group by keys. Output data will be in the format of [group by key, aggregate result1, ... aggregate resultN] Currently, we only support the following aggregation functions: 1. SUM 2. COUNT 3. MIN 4. MAX 5. DistinctCount and Count(Distinct) 6. AVG 7. FourthMoment 8. BoolAnd and BoolOr When the list of aggregation calls is empty, this class is used to calculate distinct result based on group by keys. In this case, the input can be any type. If the list of aggregation calls is not empty, the input of aggregation has to be a number. Note: This class performs aggregation over the double value of input. If the input is single value, the output type will be input type. Otherwise, the output type will be double.