mjsax commented on code in PR #15510:
URL: https://github.com/apache/kafka/pull/15510#discussion_r1522304963


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamKStreamJoin.java:
##########
@@ -223,9 +223,9 @@ private void emitNonJoinedOuterRecords(
             try (final KeyValueIterator<TimestampedKeyAndJoinSide<K>, 
LeftOrRightValue<V1, V2>> it = store.all()) {
                 TimestampedKeyAndJoinSide<K> prevKey = null;
 
+                boolean outerJoinLeftBreak = false;
+                boolean outerJoinRightBreak = false;
                 while (it.hasNext()) {
-                    boolean outerJoinLeftBreak = false;
-                    boolean outerJoinRightBreak = false;

Review Comment:
   > Will try to make a unit-test for this.
   
   Thanks! That's awesome!
   
   > The documentation says that the ordering of the KeyValueIterator is NOT 
guaranteed.
   
   But this is internal, right? This helper store is not plugable, so I think 
we could rely on ordering? -- We do store the data (ie, key) as 
`<timestamp><left/right-boolean><key>`, so we should be able to break the loop 
when we get the first timestamp which is too large (independent if it's a left 
or right record).
   
   cf `TimestampedKeyAndJoinSideSerializer.java`



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to