Package org.apache.iceberg.flink.sink
Class EqualityFieldKeySelector
java.lang.Object
org.apache.iceberg.flink.sink.EqualityFieldKeySelector
- All Implemented Interfaces:
Serializable
,org.apache.flink.api.common.functions.Function
,org.apache.flink.api.java.functions.KeySelector<org.apache.flink.table.data.RowData,
Integer>
@Internal
public class EqualityFieldKeySelector
extends Object
implements org.apache.flink.api.java.functions.KeySelector<org.apache.flink.table.data.RowData,Integer>
Create a
KeySelector
to shuffle by equality fields, to ensure same equality fields record
will be emitted to same writer in order.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEqualityFieldKeySelector
(Schema schema, org.apache.flink.table.types.logical.RowType flinkSchema, Set<Integer> equalityFieldIds) -
Method Summary
Modifier and TypeMethodDescriptiongetKey
(org.apache.flink.table.data.RowData row) protected RowDataWrapper
Construct theRowDataWrapper
lazily here because few members in it are not serializable.protected StructLikeWrapper
Construct theStructLikeWrapper
lazily because it is not serializable.protected StructProjection
Construct theStructProjection
lazily because it is not serializable.
-
Constructor Details
-
EqualityFieldKeySelector
-
-
Method Details
-
lazyRowDataWrapper
Construct theRowDataWrapper
lazily here because few members in it are not serializable. In this way, we don't have to serialize them with forcing. -
lazyStructProjection
Construct theStructProjection
lazily because it is not serializable. -
lazyStructLikeWrapper
Construct theStructLikeWrapper
lazily because it is not serializable. -
getKey
- Specified by:
getKey
in interfaceorg.apache.flink.api.java.functions.KeySelector<org.apache.flink.table.data.RowData,
Integer>
-