Class Group.AggregateCombiner<InputT>

    • Constructor Detail

      • AggregateCombiner

        public AggregateCombiner()
    • Method Detail

      • aggregateField

        public abstract <CombineInputT,​AccumT,​CombineOutputT> Group.AggregateCombiner<InputT> aggregateField​(int inputFieldId,
                                                                                                                         Combine.CombineFn<CombineInputT,​AccumT,​CombineOutputT> fn,
                                                                                                                         Schema.Field outputField)
        Build up an aggregation function over the input elements.

        This method specifies an aggregation over single field of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.

      • aggregateField

        public abstract <CombineInputT,​AccumT,​CombineOutputT> Group.AggregateCombiner<InputT> aggregateField​(java.lang.String inputFieldName,
                                                                                                                         Combine.CombineFn<CombineInputT,​AccumT,​CombineOutputT> fn,
                                                                                                                         Schema.Field outputField)
        Build up an aggregation function over the input elements.

        This method specifies an aggregation over single field of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.

      • aggregateFieldsById

        public abstract <CombineInputT,​AccumT,​CombineOutputT> Group.AggregateCombiner<InputT> aggregateFieldsById​(java.util.List<java.lang.Integer> inputFieldIds,
                                                                                                                              Combine.CombineFn<CombineInputT,​AccumT,​CombineOutputT> fn,
                                                                                                                              Schema.Field outputField)
        Build up an aggregation function over the input elements by field id.

        This method specifies an aggregation over multiple fields of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.

        Field types in the output schema will be inferred from the provided combine function. Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the overload that allows setting the output field type explicitly.