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| 构造器和说明 |
|---|
MiniBatchGlobalGroupAggFunction(GeneratedAggsHandleFunction genLocalAggsHandler,
GeneratedAggsHandleFunction genGlobalAggsHandler,
GeneratedRecordEqualiser genRecordEqualiser,
org.apache.flink.table.types.logical.LogicalType[] accTypes,
int indexOfCountStar,
boolean generateUpdateBefore)
Creates a
MiniBatchGlobalGroupAggFunction. |
| 限定符和类型 | 方法和说明 |
|---|---|
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)
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.public void open(ExecutionContext ctx) throws Exception
open 在类中 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 在类中 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 在类中 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 在类中 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–2020 The Apache Software Foundation. All rights reserved.