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 RowDataWrapperConstruct theRowDataWrapperlazily here because few members in it are not serializable.protected StructLikeWrapperConstruct theStructLikeWrapperlazily because it is not serializable.protected StructProjectionConstruct theStructProjectionlazily because it is not serializable.
-
Constructor Details
-
EqualityFieldKeySelector
-
-
Method Details
-
lazyRowDataWrapper
Construct theRowDataWrapperlazily here because few members in it are not serializable. In this way, we don't have to serialize them with forcing. -
lazyStructProjection
Construct theStructProjectionlazily because it is not serializable. -
lazyStructLikeWrapper
Construct theStructLikeWrapperlazily because it is not serializable. -
getKey
- Specified by:
getKeyin interfaceorg.apache.flink.api.java.functions.KeySelector<org.apache.flink.table.data.RowData,Integer>
-