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 asAggregateFunction
that is constructed fromBuiltInFunctionDefinition.specialize(SpecializedContext)
.Subclasses must offer a constructor that takes
SpecializedFunction.SpecializedContext
if they are constructed from aBuiltInFunctionDefinition
. Otherwise theBuiltInAggregateFunction()
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()
, andgetOutputDataType()
. Or by overridinggetTypeInference(DataTypeFactory)
directly.Since the accumulator type is runtime specific, it must be declared explicitly; otherwise it is derived from the output type.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BuiltInAggregateFunction()
protected
BuiltInAggregateFunction(org.apache.flink.table.functions.BuiltInFunctionDefinition definition, org.apache.flink.table.functions.SpecializedFunction.SpecializedContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
Methods inherited from class org.apache.flink.table.functions.ImperativeAggregateFunction
createAccumulator, getAccumulatorType, getResultType
-
Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction
close, functionIdentifier, open, toString
-
-
-
-
Method Detail
-
getArgumentDataTypes
public List<org.apache.flink.table.types.DataType> 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
public Set<org.apache.flink.table.functions.FunctionRequirement> getRequirements()
-
isDeterministic
public boolean isDeterministic()
-
-