From fd6794927b15e5a8749795596d1e47205b6c71eb Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Tue, 25 Aug 2026 16:04:50 -0400 Subject: [PATCH] docs: Remove stale "temporary fix" note from get_record_batch_memory_size --- datafusion/common/src/utils/memory.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/datafusion/common/src/utils/memory.rs b/datafusion/common/src/utils/memory.rs index c68640d0fab1..b842c7e21fd4 100644 --- a/datafusion/common/src/utils/memory.rs +++ b/datafusion/common/src/utils/memory.rs @@ -142,10 +142,9 @@ pub fn estimate_memory_size(num_elements: usize, fixed_size: usize) -> Result /// In the above case, `get_record_batch_memory_size` will return the size of /// the buffer, instead of the sum of `col1` and `col2`'s actual memory size. /// -/// Note: The current [`RecordBatch::get_array_memory_size`] will double count -/// the buffer memory size if multiple arrays within the batch are sharing the -/// same `Buffer`. This method provides a temporary fix until the issue is -/// resolved: +/// Note: [`RecordBatch::get_array_memory_size`] double counts the buffer +/// memory size if multiple arrays within the batch are sharing the same +/// `Buffer`, while this function counts each `Buffer` exactly once. pub fn get_record_batch_memory_size(batch: &RecordBatch) -> usize { RecordBatchMemoryCounter::new().count_batch(batch) }