Dandandan commented on code in PR #7420: URL: https://github.com/apache/arrow-rs/pull/7420#discussion_r2050804471
########## arrow-select/src/interleave.rs: ########## @@ -170,14 +169,14 @@ fn interleave_bytes<T: ByteArrayType>( let interleaved = Interleave::<'_, GenericByteArray<T>>::new(values, indices); let mut capacity = 0; - let mut offsets = BufferBuilder::<T::Offset>::new(indices.len() + 1); - offsets.append(T::Offset::from_usize(0).unwrap()); - for (a, b) in indices { + let mut offsets = Vec::with_capacity(indices.len() + 1); Review Comment: `Vec` and `extend` generates better code. There is probably some other places this pattern can be applied as well @mbutrovich -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org