Interface OuterJoinRecordStateView

All Superinterfaces:
JoinRecordStateView

public interface OuterJoinRecordStateView extends JoinRecordStateView
A OuterJoinRecordStateView is an extension to JoinRecordStateView. The OuterJoinRecordStateView 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
    void
    addRecord(org.apache.flink.table.data.RowData record, int numOfAssociations)
    Adds a new record with the number of associations to the state view.
    Iterable<org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.table.data.RowData,Integer>>
    Gets all the records and number of associations under the current context (i.e. join key).
    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.state.JoinRecordStateView

    addRecord, getRecords, retractRecord
  • Method Details

    • addRecord

      void addRecord(org.apache.flink.table.data.RowData record, int numOfAssociations) throws Exception
      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
      Throws:
      Exception
    • updateNumOfAssociations

      void updateNumOfAssociations(org.apache.flink.table.data.RowData record, int numOfAssociations) throws Exception
      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
      Throws:
      Exception
    • getRecordsAndNumOfAssociations

      Iterable<org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.table.data.RowData,Integer>> getRecordsAndNumOfAssociations() throws Exception
      Gets all the records and number of associations under the current context (i.e. join key).
      Throws:
      Exception