Class BuiltInAggregateFunction<T,ACC>
java.lang.Object
org.apache.flink.table.functions.UserDefinedFunction
org.apache.flink.table.functions.ImperativeAggregateFunction<T,ACC>
org.apache.flink.table.functions.AggregateFunction<T,ACC>
org.apache.flink.table.runtime.functions.aggregate.BuiltInAggregateFunction<T,ACC>
- All Implemented Interfaces:
Serializable,org.apache.flink.table.functions.FunctionDefinition
- Direct Known Subclasses:
ArrayAggFunction,BatchApproxCountDistinctAggFunctions.ApproxCountDistinctAggFunction,CollectAggFunction,FirstValueAggFunction,FirstValueWithRetractAggFunction,JsonArrayAggFunction,JsonObjectAggFunction,LagAggFunction,LastValueAggFunction,LastValueWithRetractAggFunction,ListAggWithRetractAggFunction,ListAggWsWithRetractAggFunction,MaxWithRetractAggFunction,MinWithRetractAggFunction,PercentileAggFunction
@Internal
public abstract class BuiltInAggregateFunction<T,ACC>
extends org.apache.flink.table.functions.AggregateFunction<T,ACC>
Base class for runtime implementation represented as
AggregateFunction that is
constructed from BuiltInFunctionDefinition.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.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedBuiltInAggregateFunction(org.apache.flink.table.functions.BuiltInFunctionDefinition definition, org.apache.flink.table.functions.SpecializedFunction.SpecializedContext context) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.table.types.DataTypeList<org.apache.flink.table.types.DataType>org.apache.flink.table.types.DataTypeSet<org.apache.flink.table.functions.FunctionRequirement>org.apache.flink.table.types.inference.TypeInferencegetTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory) booleanMethods inherited from class org.apache.flink.table.functions.AggregateFunction
getKind, getValueMethods inherited from class org.apache.flink.table.functions.ImperativeAggregateFunction
createAccumulator, getAccumulatorType, getResultTypeMethods inherited from class org.apache.flink.table.functions.UserDefinedFunction
close, functionIdentifier, open, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.flink.table.functions.FunctionDefinition
supportsConstantFolding
-
Constructor Details
-
BuiltInAggregateFunction
protected BuiltInAggregateFunction(org.apache.flink.table.functions.BuiltInFunctionDefinition definition, org.apache.flink.table.functions.SpecializedFunction.SpecializedContext context) -
BuiltInAggregateFunction
protected BuiltInAggregateFunction()
-
-
Method Details
-
getArgumentDataTypes
-
getAccumulatorDataType
public org.apache.flink.table.types.DataType getAccumulatorDataType() -
getOutputDataType
public org.apache.flink.table.types.DataType getOutputDataType() -
getTypeInference
public org.apache.flink.table.types.inference.TypeInference getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory) -
getRequirements
-
isDeterministic
public boolean isDeterministic()
-