Class AsyncStateGroupAggFunction
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.streaming.api.functions.KeyedProcessFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
-
- org.apache.flink.table.runtime.operators.aggregate.GroupAggFunctionBase
-
- org.apache.flink.table.runtime.operators.aggregate.async.AsyncStateGroupAggFunction
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction
public class AsyncStateGroupAggFunction extends GroupAggFunctionBase
Aggregate Function used for the groupby (without window) aggregate with async state api.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.table.runtime.operators.aggregate.GroupAggFunctionBase
accTypes, equaliser, function, genAggsHandler, generateUpdateBefore, genRecordEqualiser, recordCounter, ttlConfig
-
-
Constructor Summary
Constructors Constructor Description AsyncStateGroupAggFunction(GeneratedAggsHandleFunction genAggsHandler, GeneratedRecordEqualiser genRecordEqualiser, org.apache.flink.table.types.logical.LogicalType[] accTypes, int indexOfCountStar, boolean generateUpdateBefore, long stateRetentionTime)Creates aAsyncStateGroupAggFunction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidopen(org.apache.flink.api.common.functions.OpenContext openContext)voidprocessElement(org.apache.flink.table.data.RowData input, org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)-
Methods inherited from class org.apache.flink.table.runtime.operators.aggregate.GroupAggFunctionBase
close
-
-
-
-
Constructor Detail
-
AsyncStateGroupAggFunction
public AsyncStateGroupAggFunction(GeneratedAggsHandleFunction genAggsHandler, GeneratedRecordEqualiser genRecordEqualiser, org.apache.flink.table.types.logical.LogicalType[] accTypes, int indexOfCountStar, boolean generateUpdateBefore, long stateRetentionTime)
Creates aAsyncStateGroupAggFunction.- Parameters:
genAggsHandler- The code generated function used to handle aggregates.genRecordEqualiser- The code generated equaliser used to equal RowData.accTypes- The accumulator types.indexOfCountStar- The index of COUNT(*) in the aggregates. -1 when the input doesn't contain COUNT(*), i.e. doesn't contain retraction messages. We make sure there is a COUNT(*) if input stream contains retraction.generateUpdateBefore- Whether this operator will generate UPDATE_BEFORE messages.stateRetentionTime- state idle retention time which unit is MILLISECONDS.
-
-
Method Detail
-
open
public void open(org.apache.flink.api.common.functions.OpenContext openContext) throws Exception- Specified by:
openin interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
openin classGroupAggFunctionBase- Throws:
Exception
-
processElement
public void processElement(org.apache.flink.table.data.RowData input, org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws Exception- Specified by:
processElementin classorg.apache.flink.streaming.api.functions.KeyedProcessFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>- Throws:
Exception
-
-