Apache DataFusion SQL Query Engine
MemoryReservation exposes MemoryConsumer (#8000)
Marko Milenković747cb502c47d
diff --git a/datafusion/execution/src/memory_pool/mod.rs b/datafusion/execution/src/memory_pool/mod.rsindex bbd8f4be4f..71483e200a 100644--- a/datafusion/execution/src/memory_pool/mod.rs+++ b/datafusion/execution/src/memory_pool/mod.rs@@ -157,6 +157,11 @@ impl MemoryReservation {self.size}+ /// Returns [MemoryConsumer] for this [MemoryReservation]+ pub fn consumer(&self) -> &MemoryConsumer {+ &self.registration.consumer+ }+/// Frees all bytes from this reservation back to the underlying/// pool, returning the number of bytes freed.pub fn free(&mut self) -> usize {