rionmonster commented on code in PR #29583:
URL: https://github.com/apache/flink/pull/29583#discussion_r4486669743
##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/join/stream/state/MultiJoinStateViews.java:
##########
@@ -169,6 +187,25 @@ public Iterable<RowData> getRecords(RowData joinKey)
throws Exception {
}
return reusedList;
}
+
+ @Override
+ public @Nullable RowData getRecord(@Nullable RowData joinKey, RowData
record)
+ throws Exception {
+ // the join key contains the unique key, so a record under it has
the same unique key
+ final RowData storedRecord = recordState.get(joinKey);
+ if (storedRecord != null || !joinKeyMayChange) {
+ return storedRecord;
+ }
+ final BinaryRowData uniqueKey =
+
uniqueKeySerializer.toBinaryRow(uniqueKeySelector.getKey(record), true);
+ for (RowData candidate : recordState.values()) {
Review Comment:
> could we use the same rule as the binary join instead
I think I prefer this option. I'll go ahead and make this change as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]