public class MiniBatchGlobalGroupAggFunction extends MapBundleFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
ctx| Constructor and Description |
|---|
MiniBatchGlobalGroupAggFunction(GeneratedAggsHandleFunction genLocalAggsHandler,
GeneratedAggsHandleFunction genGlobalAggsHandler,
GeneratedRecordEqualiser genRecordEqualiser,
org.apache.flink.table.types.logical.LogicalType[] accTypes,
int indexOfCountStar,
boolean generateUpdateBefore,
long stateRetentionTime)
Creates a
MiniBatchGlobalGroupAggFunction. |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.table.data.RowData |
addInput(org.apache.flink.table.data.RowData previousAcc,
org.apache.flink.table.data.RowData input)
The
previousAcc is accumulator, but input is a row in <key, accumulator>
schema, the specific generated localAgg will project the input to
accumulator in merge method. |
void |
close() |
void |
finishBundle(Map<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData> buffer,
org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)
Called when a bundle is finished.
|
void |
open(ExecutionContext ctx) |
public MiniBatchGlobalGroupAggFunction(GeneratedAggsHandleFunction genLocalAggsHandler, GeneratedAggsHandleFunction genGlobalAggsHandler, GeneratedRecordEqualiser genRecordEqualiser, org.apache.flink.table.types.logical.LogicalType[] accTypes, int indexOfCountStar, boolean generateUpdateBefore, long stateRetentionTime)
MiniBatchGlobalGroupAggFunction.genLocalAggsHandler - The generated local aggregate handlergenGlobalAggsHandler - The generated global aggregate handlergenRecordEqualiser - 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 UPDATE_BEFORE or DELETE messages. We make sure
there is a COUNT(*) if input stream contains UPDATE_BEFORE or DELETE messages.generateUpdateBefore - Whether this operator will generate UPDATE_BEFORE messages.stateRetentionTime - state idle retention time which unit is MILLISECONDS.public void open(ExecutionContext ctx) throws Exception
open in class MapBundleFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>Exceptionpublic org.apache.flink.table.data.RowData addInput(@Nullable org.apache.flink.table.data.RowData previousAcc, org.apache.flink.table.data.RowData input) throws Exception
previousAcc is accumulator, but input is a row in <key, accumulator>
schema, the specific generated localAgg will project the input to
accumulator in merge method.addInput in class MapBundleFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>previousAcc - the existing bundle value, maybe nullinput - the given input, not nullExceptionpublic void finishBundle(Map<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData> buffer, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws Exception
MapBundleFunctionfinishBundle in class MapBundleFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>Exceptionpublic void close()
throws Exception
close in class MapBundleFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>ExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.