jorgecarleitao commented on a change in pull request #9330:
URL: https://github.com/apache/arrow/pull/9330#discussion_r566793765
##########
File path: rust/arrow/src/array/data.rs
##########
@@ -225,11 +226,11 @@ pub struct ArrayData {
/// The buffers for this array data. Note that depending on the array
types, this
/// could hold different kinds of buffers (e.g., value buffer, value
offset buffer)
/// at different positions.
- buffers: Vec<Buffer>,
+ buffers: SmallVec<[Buffer; 1]>,
Review comment:
fyi, max is 3 including the null buffer, so max is 2 in this context.
See `MutableDataArray`, where we use two buffers on the stack to avoid the
overhead. When unused, a buffer takes something like a `usize` + a pointer.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]