public class MiniBatchGlobalGroupAggFunction extends MapBundleFunction<BaseRow,BaseRow,BaseRow,BaseRow>
ctx| Constructor and Description |
|---|
MiniBatchGlobalGroupAggFunction(GeneratedAggsHandleFunction genLocalAggsHandler,
GeneratedAggsHandleFunction genGlobalAggsHandler,
GeneratedRecordEqualiser genRecordEqualiser,
org.apache.flink.table.types.logical.LogicalType[] accTypes,
int indexOfCountStar,
boolean generateRetraction)
Creates a
MiniBatchGlobalGroupAggFunction. |
| Modifier and Type | Method and Description |
|---|---|
BaseRow |
addInput(BaseRow previousAcc,
BaseRow 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<BaseRow,BaseRow> buffer,
org.apache.flink.util.Collector<BaseRow> 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 generateRetraction)
MiniBatchGlobalGroupAggFunction.genLocalAggsHandler - The generated local aggregate handlergenGlobalAggsHandler - The generated global aggregate handlergenRecordEqualiser - The code generated equaliser used to equal BaseRow.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.generateRetraction - Whether this operator will generate retraction.public void open(ExecutionContext ctx) throws Exception
public BaseRow addInput(@Nullable BaseRow previousAcc, BaseRow 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.public void finishBundle(Map<BaseRow,BaseRow> buffer, org.apache.flink.util.Collector<BaseRow> out) throws Exception
MapBundleFunctionfinishBundle in class MapBundleFunction<BaseRow,BaseRow,BaseRow,BaseRow>ExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.