public class MiniBatchGlobalGroupAggFunction extends MapBundleFunction<RowData,RowData,RowData,RowData>
ctx
Constructor and Description |
---|
MiniBatchGlobalGroupAggFunction(GeneratedAggsHandleFunction genLocalAggsHandler,
GeneratedAggsHandleFunction genGlobalAggsHandler,
GeneratedRecordEqualiser genRecordEqualiser,
LogicalType[] accTypes,
int indexOfCountStar,
boolean generateUpdateBefore,
long stateRetentionTime)
Creates a
MiniBatchGlobalGroupAggFunction . |
Modifier and Type | Method and Description |
---|---|
RowData |
addInput(RowData previousAcc,
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<RowData,RowData> buffer,
Collector<RowData> out)
Called when a bundle is finished.
|
void |
open(ExecutionContext ctx) |
public MiniBatchGlobalGroupAggFunction(GeneratedAggsHandleFunction genLocalAggsHandler, GeneratedAggsHandleFunction genGlobalAggsHandler, GeneratedRecordEqualiser genRecordEqualiser, 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
public RowData addInput(@Nullable RowData previousAcc, 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.public void finishBundle(Map<RowData,RowData> buffer, Collector<RowData> out) throws Exception
MapBundleFunction
finishBundle
in class MapBundleFunction<RowData,RowData,RowData,RowData>
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.