Interface OuterJoinRecordAsyncStateView

All Superinterfaces:
JoinRecordAsyncStateView

public interface OuterJoinRecordAsyncStateView extends JoinRecordAsyncStateView
A OuterJoinRecordAsyncStateView is an extension to JoinRecordAsyncStateView. The OuterJoinRecordAsyncStateView is used to store records for the outer input side of the Join, e.g. the left side of left join, the both side of full join.

The additional information we should store with the record is the number of associations which is the number of records associated this record with other side. This is an important information when to send/retract a null padding row, to avoid recompute the associated numbers every time.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.apache.flink.api.common.state.v2.StateFuture<Void>
    addRecord(org.apache.flink.table.data.RowData record)
    Add a new record to the state view.
    org.apache.flink.api.common.state.v2.StateFuture<Void>
    addRecord(org.apache.flink.table.data.RowData record, int numOfAssociations)
    Adds a new record with the number of associations to the state view.
    default org.apache.flink.api.common.state.v2.StateFuture<List<OuterRecord>>
    findMatchedRecords(Function<org.apache.flink.table.data.RowData,Boolean> condition)
    Find all the records matched the condition under the current context (i.e. join key).
    org.apache.flink.api.common.state.v2.StateFuture<List<OuterRecord>>
    findMatchedRecordsAndNumOfAssociations(Function<org.apache.flink.table.data.RowData,Boolean> condition)
    Find all the records matched the condition and the corresponding number of associations under the current context (i.e. join key).
    org.apache.flink.api.common.state.v2.StateFuture<Void>
    updateNumOfAssociations(org.apache.flink.table.data.RowData record, int numOfAssociations)
    Updates the number of associations belongs to the record.

    Methods inherited from interface org.apache.flink.table.runtime.operators.join.stream.asyncprocessing.state.JoinRecordAsyncStateView

    retractRecord
  • Method Details

    • addRecord

      org.apache.flink.api.common.state.v2.StateFuture<Void> addRecord(org.apache.flink.table.data.RowData record, int numOfAssociations)
      Adds a new record with the number of associations to the state view.
      Parameters:
      record - the added record
      numOfAssociations - the number of records associated with other side
    • updateNumOfAssociations

      org.apache.flink.api.common.state.v2.StateFuture<Void> updateNumOfAssociations(org.apache.flink.table.data.RowData record, int numOfAssociations)
      Updates the number of associations belongs to the record.
      Parameters:
      record - the record to update
      numOfAssociations - the new number of records associated with other side
    • findMatchedRecordsAndNumOfAssociations

      org.apache.flink.api.common.state.v2.StateFuture<List<OuterRecord>> findMatchedRecordsAndNumOfAssociations(Function<org.apache.flink.table.data.RowData,Boolean> condition)
      Find all the records matched the condition and the corresponding number of associations under the current context (i.e. join key).
    • addRecord

      default org.apache.flink.api.common.state.v2.StateFuture<Void> addRecord(org.apache.flink.table.data.RowData record)
      Description copied from interface: JoinRecordAsyncStateView
      Add a new record to the state view.
      Specified by:
      addRecord in interface JoinRecordAsyncStateView
    • findMatchedRecords

      default org.apache.flink.api.common.state.v2.StateFuture<List<OuterRecord>> findMatchedRecords(Function<org.apache.flink.table.data.RowData,Boolean> condition)
      Description copied from interface: JoinRecordAsyncStateView
      Find all the records matched the condition under the current context (i.e. join key).
      Specified by:
      findMatchedRecords in interface JoinRecordAsyncStateView