Class ProcTimeMiniBatchDeduplicateKeepFirstRowFunction
java.lang.Object
org.apache.flink.table.runtime.operators.bundle.MapBundleFunction<K,V,IN,OUT>
org.apache.flink.table.runtime.operators.deduplicate.ProcTimeMiniBatchDeduplicateKeepFirstRowFunction
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function
This function is used to get the first row for every key partition in miniBatch mode.
The state stores a boolean flag to indicate whether key appears before as an optimization.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longprotected org.apache.flink.api.common.state.ValueState<Boolean>protected final org.apache.flink.api.common.typeinfo.TypeInformation<Boolean>Fields inherited from class org.apache.flink.table.runtime.operators.bundle.MapBundleFunction
ctx -
Constructor Summary
ConstructorsConstructorDescriptionProcTimeMiniBatchDeduplicateKeepFirstRowFunction(org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> serializer, long stateRetentionTime) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.table.data.RowDataaddInput(org.apache.flink.table.data.RowData value, org.apache.flink.table.data.RowData input) Adds the given input to the given value, returning the new bundle value.voidfinishBundle(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.voidopen(ExecutionContext ctx) Methods inherited from class org.apache.flink.table.runtime.operators.bundle.MapBundleFunction
close
-
Field Details
-
stateType
-
minRetentionTime
protected final long minRetentionTime -
state
-
-
Constructor Details
-
ProcTimeMiniBatchDeduplicateKeepFirstRowFunction
public ProcTimeMiniBatchDeduplicateKeepFirstRowFunction(org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> serializer, long stateRetentionTime)
-
-
Method Details
-
addInput
public org.apache.flink.table.data.RowData addInput(@Nullable org.apache.flink.table.data.RowData value, org.apache.flink.table.data.RowData input) Description copied from class:MapBundleFunctionAdds the given input to the given value, returning the new bundle value.- Specified by:
addInputin classMapBundleFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData, org.apache.flink.table.data.RowData, org.apache.flink.table.data.RowData> - Parameters:
value- the existing bundle value, maybe nullinput- the given input, not null
-
finishBundle
public 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 ExceptionDescription copied from class:MapBundleFunctionCalled when a bundle is finished. Transform a bundle to zero, one, or more output elements.- Specified by:
finishBundlein classMapBundleFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData, org.apache.flink.table.data.RowData, org.apache.flink.table.data.RowData> - Throws:
Exception
-
open
- Overrides:
openin classMapBundleFunction<K,V, IN, OUT> - Throws:
Exception
-