Skip to content

Commit

Permalink
Minor: more comments for RecordBatch.get_array_memory_size() (#6607)
Browse files Browse the repository at this point in the history
* doc RecordBatch size

* Update arrow-array/src/record_batch.rs

Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>

---------

Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>
  • Loading branch information
2010YOUY01 and tustvold authored Oct 21, 2024
1 parent 4d4c0c6 commit 79ea6ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arrow-array/src/record_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,11 @@ impl RecordBatch {
}

/// Returns the total number of bytes of memory occupied physically by this batch.
///
/// Note that this does not always correspond to the exact memory usage of a
/// `RecordBatch` (might overestimate), since multiple columns can share the same
/// buffers or slices thereof, the memory used by the shared buffers might be
/// counted multiple times.
pub fn get_array_memory_size(&self) -> usize {
self.columns()
.iter()
Expand Down

0 comments on commit 79ea6ad

Please sign in to comment.