Dandandan commented on code in PR #16359: URL: https://github.com/apache/datafusion/pull/16359#discussion_r2139196390
########## 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: Thats possible, let me have a look at whether we can use recordbatch always. My corcern was we might not always have a RecordBatch, but might have an Array. In that case conversion to recordbatch would be strange. -- 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