alamb commented on code in PR #9156:
URL: https://github.com/apache/arrow-rs/pull/9156#discussion_r2686803980


##########
arrow-array/src/array/byte_view_array.rs:
##########
@@ -988,9 +988,13 @@ impl<'a, T: ByteViewType + ?Sized> IntoIterator for &'a 
GenericByteViewArray<T>
 
 impl<T: ByteViewType + ?Sized> From<ArrayData> for GenericByteViewArray<T> {
     fn from(data: ArrayData) -> Self {
-        let (_data_type, len, nulls, offset, mut buffers, _child_data) = 
data.into_parts();
-        let views = buffers.remove(0); // need to maintain order of remaining 
buffers

Review Comment:
   the idea is that `remove(0)` copies all the buffers and then Arc::from 
allocates/copies it again. Using `Arc::from_iter` builds the results directly



-- 
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]

Reply via email to