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 Details

    • EqualityFieldKeySelector

      public EqualityFieldKeySelector(Schema schema, org.apache.flink.table.types.logical.RowType flinkSchema, Set<Integer> equalityFieldIds)
  • Method Details

    • lazyRowDataWrapper

      protected RowDataWrapper lazyRowDataWrapper()
      Construct the RowDataWrapper lazily here because few members in it are not serializable. In this way, we don't have to serialize them with forcing.
    • lazyStructProjection

      protected StructProjection lazyStructProjection()
      Construct the StructProjection lazily because it is not serializable.
    • lazyStructLikeWrapper

      protected StructLikeWrapper lazyStructLikeWrapper()
      Construct the StructLikeWrapper lazily because it is not serializable.
    • getKey

      public Integer getKey(org.apache.flink.table.data.RowData row)
      Specified by:
      getKey in interface org.apache.flink.api.java.functions.KeySelector<org.apache.flink.table.data.RowData,Integer>