2010YOUY01 commented on code in PR #16359:
URL: https://github.com/apache/datafusion/pull/16359#discussion_r2139040880


##########
datafusion/execution/src/memory_pool/mod.rs:
##########
@@ -131,14 +133,58 @@ pub trait MemoryPool: Send + Sync + std::fmt::Debug {
     /// This must always succeed
     fn grow(&self, reservation: &MemoryReservation, additional: usize);
 
+    /// Infallibly grow the provided `reservation` by bytes in held in 
&[Arc<dyn Array>]
+    ///
+    /// This defaults to summing the memory size of all arrays, but can be
+    /// overridden by implementations that track the memory size of Array 
usages
+    fn grow_with_arrays(
+        &self,
+        reservation: &MemoryReservation,
+        arrays: &[Arc<dyn Array>],

Review Comment:
   Can we make the API take `RecordBatch` instead of arrays? Since inside df 
it's more common to passing batches around, and we can use a utility function 
to do `batch -> [Array]` for array usages.



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