gianm commented on code in PR #20589:
URL: https://github.com/apache/druid/pull/20589#discussion_r4278866463


##########
multi-stage-query/src/main/java/org/apache/druid/msq/querykit/ReadableInputQueue.java:
##########
@@ -303,11 +316,15 @@ private ListenableFuture<ReadableInput> nextSegmentInput()
 
   /**
    * Load the next segment from {@link #loadableSegments} and return a future 
to its reference. Returns null
-   * if {@link #loadableSegments} is empty.
+   * if {@link #loadableSegments} is empty, or if {@link #canSkipRemaining} is 
true.
    */
   @Nullable
   private ListenableFuture<ReadableInput> loadNextSegment()
   {
+    if (canSkipRemaining.getAsBoolean()) {

Review Comment:
   I think this is fine, the idea is to be extremely lightweight with the 
check, rather than to make the check bulletproof. It's fine if a little extra 
work happens.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to