Class ImperativeAggregateFunction<T,​ACC>

    • Constructor Detail

      • ImperativeAggregateFunction

        public ImperativeAggregateFunction()
    • Method Detail

      • createAccumulator

        public abstract ACC createAccumulator()
        Creates and initializes the accumulator for this ImperativeAggregateFunction.

        The accumulator is an intermediate data structure that stores the aggregated values until a final aggregation result is computed.

        Returns:
        the accumulator with the initial value
      • getResultType

        @Deprecated
        public org.apache.flink.api.common.typeinfo.TypeInformation<T> getResultType()
        Deprecated.
        This method uses the old type system and is based on the old reflective extraction logic. The method will be removed in future versions and is only called when using the deprecated TableEnvironment.registerFunction(...) method. The new reflective extraction logic (possibly enriched with DataTypeHint and FunctionHint) should be powerful enough to cover most use cases. For advanced users, it is possible to override UserDefinedFunction.getTypeInference(DataTypeFactory).
        Returns the TypeInformation of the ImperativeAggregateFunction's result.
        Returns:
        The TypeInformation of the ImperativeAggregateFunction's result or null if the result type should be automatically inferred.
      • getAccumulatorType

        @Deprecated
        public org.apache.flink.api.common.typeinfo.TypeInformation<ACC> getAccumulatorType()
        Deprecated.
        This method uses the old type system and is based on the old reflective extraction logic. The method will be removed in future versions and is only called when using the deprecated TableEnvironment.registerFunction(...) method. The new reflective extraction logic (possibly enriched with DataTypeHint and FunctionHint) should be powerful enough to cover most use cases. For advanced users, it is possible to override UserDefinedFunction.getTypeInference(DataTypeFactory).
        Returns the TypeInformation of the ImperativeAggregateFunction's accumulator.
        Returns:
        The TypeInformation of the ImperativeAggregateFunction's accumulator or null if the accumulator type should be automatically inferred.