Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions arrow-array/src/record_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,20 @@ impl RecordBatch {
RecordBatch::try_new(schema, columns)
}

/// Registers all buffers in this record batch with the provided [`MemoryPool`].
///
/// This claims memory for all columns in the batch by calling [`Array::claim`]
/// on each column.
///
/// [`MemoryPool`]: arrow_buffer::MemoryPool
/// [`Array::claim`]: crate::Array::claim
#[cfg(feature = "pool")]
pub fn claim(&self, pool: &dyn arrow_buffer::MemoryPool) {
for column in self.columns() {
column.claim(pool);
}
}

/// 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
Expand Down
Loading