public class LookupMergeFunction extends Object implements MergeFunction<KeyValue>
MergeFunction for lookup, this wrapper only considers the latest high level record,
because each merge will query the old merged record, so the latest high level record should be
the final merged value.| Constructor and Description |
|---|
LookupMergeFunction(MergeFunction<KeyValue> mergeFunction,
RowType keyType,
RowType valueType) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(KeyValue kv)
Add the given
KeyValue to the merge function. |
KeyValue |
getResult()
Get current merged value.
|
void |
reset()
Reset the merge function to its default state.
|
static MergeFunctionFactory<KeyValue> |
wrap(MergeFunctionFactory<KeyValue> wrapped,
RowType keyType,
RowType valueType) |
public LookupMergeFunction(MergeFunction<KeyValue> mergeFunction, RowType keyType, RowType valueType)
public void reset()
MergeFunctionreset in interface MergeFunction<KeyValue>public void add(KeyValue kv)
MergeFunctionKeyValue to the merge function.add in interface MergeFunction<KeyValue>public KeyValue getResult()
MergeFunctiongetResult in interface MergeFunction<KeyValue>public static MergeFunctionFactory<KeyValue> wrap(MergeFunctionFactory<KeyValue> wrapped, RowType keyType, RowType valueType)
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.