DerGut commented on code in PR #15692:
URL: https://github.com/apache/datafusion/pull/15692#discussion_r2041222385


##########
datafusion/physical-plan/src/sorts/sort.rs:
##########
@@ -765,6 +765,25 @@ impl ExternalSorter {
 
         Ok(())
     }
+
+    /// Reserves memory to be able to accommodate the given batch.
+    /// If memory is scarce, tries to spill current in-memory batches to disk 
first.
+    async fn reserve_memory_for_batch(&mut self, input: &RecordBatch) -> 
Result<()> {

Review Comment:
   I renamed it to `reserve_memory_for_batch_and_maybe_spill` in 
https://github.com/apache/datafusion/pull/15692/commits/ba247814b6c12f3e0c8dd19bc45a2e635510aa81
 because I think `reserve_memory_for_batch_or_spill` suggests that it only does 
one of those things, wdyt?



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

Reply via email to