SteveStevenpoor commented on code in PR #28671:
URL: https://github.com/apache/flink/pull/28671#discussion_r3536096739


##########
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/operators/join/stream/StreamingMiniBatchJoinOperatorTest.java:
##########
@@ -564,6 +564,73 @@ void 
testInnerJoinWithJoinKeyContainsUniqueKeyCrossBatches() throws Exception {
                         "TRUCK"));
     }
 
+    @Tag("miniBatchSize=4")
+    @Test
+    void 
testInnerJoinWithJoinKeyContainsUniqueKeyInsertThenUpdateAfterFoldEmitsInsert()

Review Comment:
   I think we should also add a test where the state already contains a +I and 
the bundle contains -U followed by +U, to verify that the final +U is not 
converted to +I



##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/join/stream/bundle/InputSideHasUniqueKeyBundle.java:
##########
@@ -33,8 +34,23 @@
 /** For the case that input has uniqueKey which is not contained by joinKey. */
 public class InputSideHasUniqueKeyBundle extends BufferBundle<Map<RowData, 
List<RowData>>> {

Review Comment:
   Although I understand that in the NoUniqueKey case we cannot tell whether 
the first +I in the bundle is really the first insert without checking the 
state, I still think the same issue may be possible here.
   
   What confuses me is that after this PR, this case will produce a different 
result from the others.



-- 
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]

Reply via email to