Class ArrayAggFunction<T>
- 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<org.apache.flink.table.data.ArrayData,ArrayAggFunction.ArrayAggAccumulator<T>>
-
- org.apache.flink.table.runtime.functions.aggregate.ArrayAggFunction<T>
-
- All Implemented Interfaces:
Serializable
,org.apache.flink.table.functions.FunctionDefinition
@Internal public final class ArrayAggFunction<T> extends BuiltInAggregateFunction<org.apache.flink.table.data.ArrayData,ArrayAggFunction.ArrayAggAccumulator<T>>
Built-in ARRAY_AGG aggregate function.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ArrayAggFunction.ArrayAggAccumulator<T>
Accumulator for ARRAY_AGG with retraction.
-
Constructor Summary
Constructors Constructor Description ArrayAggFunction(org.apache.flink.table.types.logical.LogicalType elementType, boolean ignoreNulls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accumulate(ArrayAggFunction.ArrayAggAccumulator<T> acc, T value)
ArrayAggFunction.ArrayAggAccumulator<T>
createAccumulator()
org.apache.flink.table.types.DataType
getAccumulatorDataType()
List<org.apache.flink.table.types.DataType>
getArgumentDataTypes()
org.apache.flink.table.types.DataType
getOutputDataType()
org.apache.flink.table.data.ArrayData
getValue(ArrayAggFunction.ArrayAggAccumulator<T> acc)
void
merge(ArrayAggFunction.ArrayAggAccumulator<T> acc, Iterable<ArrayAggFunction.ArrayAggAccumulator<T>> its)
void
resetAccumulator(ArrayAggFunction.ArrayAggAccumulator<T> acc)
void
retract(ArrayAggFunction.ArrayAggAccumulator<T> acc, T value)
-
Methods inherited from class org.apache.flink.table.runtime.functions.aggregate.BuiltInAggregateFunction
getRequirements, getTypeInference, isDeterministic
-
Methods inherited from class org.apache.flink.table.functions.ImperativeAggregateFunction
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()
- Overrides:
getArgumentDataTypes
in classBuiltInAggregateFunction<org.apache.flink.table.data.ArrayData,ArrayAggFunction.ArrayAggAccumulator<T>>
-
getAccumulatorDataType
public org.apache.flink.table.types.DataType getAccumulatorDataType()
- Overrides:
getAccumulatorDataType
in classBuiltInAggregateFunction<org.apache.flink.table.data.ArrayData,ArrayAggFunction.ArrayAggAccumulator<T>>
-
getOutputDataType
public org.apache.flink.table.types.DataType getOutputDataType()
- Overrides:
getOutputDataType
in classBuiltInAggregateFunction<org.apache.flink.table.data.ArrayData,ArrayAggFunction.ArrayAggAccumulator<T>>
-
createAccumulator
public ArrayAggFunction.ArrayAggAccumulator<T> createAccumulator()
- Specified by:
createAccumulator
in classorg.apache.flink.table.functions.ImperativeAggregateFunction<org.apache.flink.table.data.ArrayData,ArrayAggFunction.ArrayAggAccumulator<T>>
-
accumulate
public void accumulate(ArrayAggFunction.ArrayAggAccumulator<T> acc, T value) throws Exception
- Throws:
Exception
-
retract
public void retract(ArrayAggFunction.ArrayAggAccumulator<T> acc, T value) throws Exception
- Throws:
Exception
-
merge
public void merge(ArrayAggFunction.ArrayAggAccumulator<T> acc, Iterable<ArrayAggFunction.ArrayAggAccumulator<T>> its) throws Exception
- Throws:
Exception
-
getValue
public org.apache.flink.table.data.ArrayData getValue(ArrayAggFunction.ArrayAggAccumulator<T> acc)
- Specified by:
getValue
in classorg.apache.flink.table.functions.AggregateFunction<org.apache.flink.table.data.ArrayData,ArrayAggFunction.ArrayAggAccumulator<T>>
-
resetAccumulator
public void resetAccumulator(ArrayAggFunction.ArrayAggAccumulator<T> acc)
-
-