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


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/kernel/worker/WorkerStagePhase.java:
##########
@@ -70,7 +71,7 @@ public boolean canTransitionFrom(final WorkerStagePhase 
priorPhase)
     @Override
     public boolean canTransitionFrom(final WorkerStagePhase priorPhase)
     {
-      return priorPhase == RESULTS_READY;
+      return priorPhase.compareTo(FINISHED) < 0;

Review Comment:
   Yes, this is needed for supporting `LIMIT`. When a downstream stage applies 
a `LIMIT`, it's possible for the upstream to be finished if it hasn't fully 
generated its output. I added a comment describing this case.



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