@Internal
public abstract class BuiltInAggregateFunction<T,ACC>
extends org.apache.flink.table.functions.AggregateFunction<T,ACC>
AggregateFunction that is
constructed from SpecializedFunction.specialize(SpecializedContext).
Subclasses must offer a constructor that takes SpecializedFunction.SpecializedContext if they are
constructed from a BuiltInFunctionDefinition. Otherwise the BuiltInAggregateFunction() constructor might be more appropriate.
By default, all built-in functions work on internal data structures. However, this can be
changed by overriding getArgumentDataTypes(), getAccumulatorDataType(), and
getOutputDataType(). Or by overriding getTypeInference(DataTypeFactory)
directly.
Since the accumulator type is runtime specific, it must be declared explicitly; otherwise it is derived from the output type.
| 限定符 | 构造器和说明 |
|---|---|
protected |
BuiltInAggregateFunction() |
protected |
BuiltInAggregateFunction(org.apache.flink.table.functions.BuiltInFunctionDefinition definition,
org.apache.flink.table.functions.SpecializedFunction.SpecializedContext context) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.flink.table.types.DataType |
getAccumulatorDataType() |
List<org.apache.flink.table.types.DataType> |
getArgumentDataTypes() |
org.apache.flink.table.types.DataType |
getOutputDataType() |
Set<org.apache.flink.table.functions.FunctionRequirement> |
getRequirements() |
org.apache.flink.table.types.inference.TypeInference |
getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory) |
boolean |
isDeterministic() |
createAccumulator, getAccumulatorType, getResultTypeprotected BuiltInAggregateFunction(org.apache.flink.table.functions.BuiltInFunctionDefinition definition,
org.apache.flink.table.functions.SpecializedFunction.SpecializedContext context)
protected BuiltInAggregateFunction()
public List<org.apache.flink.table.types.DataType> getArgumentDataTypes()
public org.apache.flink.table.types.DataType getAccumulatorDataType()
public org.apache.flink.table.types.DataType getOutputDataType()
public org.apache.flink.table.types.inference.TypeInference getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory)
public Set<org.apache.flink.table.functions.FunctionRequirement> getRequirements()
public boolean isDeterministic()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.