Class InputSideHasNoUniqueKeyBundle
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.join.stream.bundle.BufferBundle<Map<Integer,List<org.apache.flink.table.data.RowData>>>
-
- org.apache.flink.table.runtime.operators.join.stream.bundle.InputSideHasNoUniqueKeyBundle
-
public class InputSideHasNoUniqueKeyBundle extends BufferBundle<Map<Integer,List<org.apache.flink.table.data.RowData>>>
For the case that input has no uniqueKey.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.table.runtime.operators.join.stream.bundle.BufferBundle
actualSize, bundle, count
-
-
Constructor Summary
Constructors Constructor Description InputSideHasNoUniqueKeyBundle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddRecord(org.apache.flink.table.data.RowData joinKey, org.apache.flink.table.data.RowData uniqueKey, org.apache.flink.table.data.RowData record)The structure of the bundle: first-level key is the joinKey while the second-level key is the hash value of the record.Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>>getRecords()Get records associated with joinKeys from bufferBundle.Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>>getRecordsWithJoinKey(org.apache.flink.table.data.RowData joinKey)Get records associated with joinKeys from bufferBundle.-
Methods inherited from class org.apache.flink.table.runtime.operators.join.stream.bundle.BufferBundle
clear, getJoinKeys, isEmpty, reducedSize
-
-
-
-
Method Detail
-
addRecord
public int addRecord(org.apache.flink.table.data.RowData joinKey, @Nullable org.apache.flink.table.data.RowData uniqueKey, org.apache.flink.table.data.RowData record)The structure of the bundle: first-level key is the joinKey while the second-level key is the hash value of the record. And the value of the second hash is a list of records. The bundle only stores the accumulated records.When the retract record occurs it would find the corresponding records(accumulated) and remove it.- Specified by:
addRecordin classBufferBundle<Map<Integer,List<org.apache.flink.table.data.RowData>>>- Parameters:
joinKey- the joinKey associated with the record.uniqueKey- the uniqueKey associated with the record. This could be null.record- The record to add.- Returns:
- number of processed by current bundle.
-
getRecords
public Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>> getRecords() throws Exception
Description copied from class:BufferBundleGet records associated with joinKeys from bufferBundle.- Specified by:
getRecordsin classBufferBundle<Map<Integer,List<org.apache.flink.table.data.RowData>>>- Returns:
- a map whose key is joinKey and value is list of records.
- Throws:
Exception
-
getRecordsWithJoinKey
public Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>> getRecordsWithJoinKey(org.apache.flink.table.data.RowData joinKey)
Description copied from class:BufferBundleGet records associated with joinKeys from bufferBundle. And this function is different from getRecords() above where getRecords() returns a map whose key is joinKey and value is list of records.- Specified by:
getRecordsWithJoinKeyin classBufferBundle<Map<Integer,List<org.apache.flink.table.data.RowData>>>- Parameters:
joinKey- one of joinKeys stored in this bundle.- Returns:
- a map whose key is uniqueKey and value is a list of records.
-
-