maytasm commented on code in PR #19357:
URL: https://github.com/apache/druid/pull/19357#discussion_r3192696172


##########
processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/SpillingGrouper.java:
##########
@@ -293,6 +320,22 @@ public void setSpillingAllowed(final boolean 
spillingAllowed)
   @Override
   public CloseableIterator<Entry<KeyType>> iterator(final boolean sorted)
   {
+    // Flush any runs that did not reach MIN_SPILL_FILE_BYTES during the spill 
phase.
+    try {
+      flushPendingRunsToDisk();

Review Comment:
   Btw I wanted to benchmark `SpillingGrouper.iterator(false)` code path but 
turns out that  SpillingGrouper.iterator(false) is never reachable through any 
production query path without a code change. 
   
     The only place SpillingGrouper.iterator() is called is:                    
                                                                                
                        
     - RowBasedGrouperHelper:634 → iterator(true) (always)                      
                                                                                
                        
     - ConcurrentGrouper:430/470 → iterator(true) or iterator(sorted) (where 
sorted comes from ConcurrentGrouper.iterator(sorted), which is always called 
with true from                
     RowBasedGrouperHelper)   



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