zhuqi-lucas opened a new issue, #14692: URL: https://github.com/apache/datafusion/issues/14692
### Is your feature request related to a problem or challenge? This is a follow-up for https://github.com/apache/datafusion/pull/14644: See details in https://github.com/apache/datafusion/pull/14644#discussion_r1957155614 cc @alamb @Kontinuation We need a complete solution about stable sort with spill, several issues until now: 1. Ensuring we can always spill data (now spilling will sometimes fail if we run out of memory to sort the batches in) 2. Ensuring that we can always merge the data that was spilled, even if it had a really wide fanout (like 1000 of spill files) The think problem 1 could be solved by potentially spilling unsorted batches (and then sorting them separately). This would be less efficient (read/write some tuples twice but would work. Problem 2 could use the multi-pass merge: We can implement a more complicated multi-stage merging phase which merges a small portion of streams each time, and perform multiple rounds of merges to produce the final merged stream. ### 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: [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]
