public class AggregateMergeFunction extends Object implements MergeFunction<KeyValue>
MergeFunction
where key is primary key (unique) and value is the partial record,
pre-aggregate non-null fields on merge.Modifier and Type | Class and Description |
---|---|
static class |
AggregateMergeFunction.RowAggregator
Provide an Aggregator for merge a new row data.
|
Modifier | Constructor and Description |
---|---|
protected |
AggregateMergeFunction(org.apache.flink.table.data.RowData.FieldGetter[] getters,
AggregateMergeFunction.RowAggregator rowAggregator) |
Modifier and Type | Method and Description |
---|---|
void |
add(KeyValue kv)
Add the given
KeyValue to the merge function. |
static MergeFunctionFactory<KeyValue> |
factory(org.apache.flink.configuration.Configuration conf,
List<String> tableNames,
List<org.apache.flink.table.types.logical.LogicalType> tableTypes,
List<String> primaryKeys) |
KeyValue |
getResult()
Get current merged value.
|
void |
reset()
Reset the merge function to its default state.
|
protected AggregateMergeFunction(org.apache.flink.table.data.RowData.FieldGetter[] getters, AggregateMergeFunction.RowAggregator rowAggregator)
public void reset()
MergeFunction
reset
in interface MergeFunction<KeyValue>
public void add(KeyValue kv)
MergeFunction
KeyValue
to the merge function.add
in interface MergeFunction<KeyValue>
@Nullable public KeyValue getResult()
MergeFunction
getResult
in interface MergeFunction<KeyValue>
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.