Dandandan commented on code in PR #6622:
URL: https://github.com/apache/arrow-rs/pull/6622#discussion_r1815617940
##########
arrow-select/src/take.rs:
##########
@@ -459,11 +461,10 @@ fn take_bytes<T: ByteArrayType, IndexType:
ArrowPrimitiveType>(
) -> Result<GenericByteArray<T>, ArrowError> {
let data_len = indices.len();
- let bytes_offset = (data_len + 1) * std::mem::size_of::<T::Offset>();
- let mut offsets = MutableBuffer::new(bytes_offset);
+ let mut offsets = Vec::with_capacity(data_len + 1);
offsets.push(T::Offset::default());
- let mut values = MutableBuffer::new(0);
+ let mut values = Vec::new();
Review Comment:
Removed this part - was looking at `take_bytes` as well but results are a
bit mixed (might be benchmark related).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]