2010YOUY01 opened a new issue, #16909: URL: https://github.com/apache/datafusion/issues/16909
### Is your feature request related to a problem or challenge? This is a follow-up to: https://github.com/apache/datafusion/pull/15700 Part of https://github.com/apache/datafusion/issues/15271 To add a more comprehensive solution to external sort, #15700 uses an optimistic approach: 1. It first uses `MultiLevelMergeBuilder` to do possible re-spills, and ensure the later `SortPreservingMergeStream` won't use memory larger than the budget 2. Construct a `SortPreservingMergeStream` from that builder, and this SPM stream bypasses the memory pool (don't validate the actual memory usage) The existing memory tracking in DF is always validate in the memory-consuming operator itself, to prevent the inaccurate memory estimation. Here is an idea (also the original discussion) to also enforce validation in this case: https://github.com/apache/datafusion/pull/15700#discussion_r2217228918 ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org