TinyMurky commented on code in PR #25158:
URL: https://github.com/apache/datafusion/pull/25158#discussion_r3995625887


##########
datafusion/physical-plan/src/aggregates/single_stream.rs:
##########
@@ -449,6 +454,27 @@ impl SingleHashAggregateStream {
                     return Self::break_with_err(e);
                 }
 
+                // Soft limit optimization:

Review Comment:
   I have added the following comment to `SingleHashAggregateStream` to 
discribe how it optimized to soft limit, and the early termination mechanism
   
   
https://github.com/TinyMurky/datafusion/blob/e92aee75ea5bf774d0dbd6be648849a124c7797e/datafusion/physical-plan/src/aggregates/single_stream.rs#L92-L118
   
   And I changed
   
   
https://github.com/apache/datafusion/pull/25158/changes#diff-7510cf151de37d38c84ae95fbac7b1ad98dd964249091fab5a91ce6e79f593acR138
   
   to 
   
   ```
       /// See the "Optimization: DISTINCT LIMIT Soft Limit" section in
       /// [`SingleHashAggregateStream`] for details.
   ```



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