Dandandan commented on a change in pull request #9279:
URL: https://github.com/apache/arrow/pull/9279#discussion_r561307105
##########
File path: rust/arrow/src/compute/kernels/take.rs
##########
@@ -423,7 +423,7 @@ where
let mut offsets_buffer = MutableBuffer::from_len_zeroed(bytes_offset);
let offsets = offsets_buffer.typed_data_mut();
- let mut values = Vec::with_capacity(bytes_offset);
+ let mut values = MutableBuffer::new(0);
Review comment:
Used to be here `bytes_offset` but that doesn't make a lot of sense.
The values array could be empty as well (e.g. for empty strings), or have a
different capacity altogether.
----------------------------------------------------------------
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]