DerGut commented on code in PR #15692: URL: https://github.com/apache/datafusion/pull/15692#discussion_r2041181467
########## datafusion/physical-plan/src/sorts/sort.rs: ########## @@ -529,6 +523,12 @@ impl ExternalSorter { /// Sorts the in-memory batches and merges them into a single sorted run, then writes /// the result to spill files. async fn sort_and_spill_in_mem_batches(&mut self) -> Result<()> { + if self.in_mem_batches.is_empty() { Review Comment: Makes a lot of sense to me! Its now returning an error with https://github.com/apache/datafusion/pull/15692/commits/5c3502d6fbe3136f0435afb90fa99b5af742d914 -- 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 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