LakshSingla commented on code in PR #14196:
URL: https://github.com/apache/druid/pull/14196#discussion_r1231424399


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/common/SortMergeJoinFrameProcessor.java:
##########
@@ -273,12 +275,14 @@ public ReturnOrAwait<Long> runIncrementally(IntSet 
readableInputs) throws IOExce
 
         tracker.advance();
 
-        // On next iteration (when we're sure to have data), update mark if 
the key changed.
+        // On next iteration (when we're sure to have data), check if we've 
moved on to a new key.
         onNextIteration(() -> {
           if (!tracker.isCurrentSameKeyAsMark()) {

Review Comment:
   Can this be changed to something like
   ```suggestion
             while (tracker.isCurrentSameKeyAsMark() && 
!tracker.isEndOfPushedData()) {
               tracker.advance()
             }
             trackerWithCompleteSetForCurrentKey = -1;
             tracker.markCurrent();
   ```
   
   This would iterate over all the frames that have multiple same keys in a 
chunked fashion instead of one at a time in the next iteration.



-- 
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: commits-unsubscr...@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to