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


##########
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
-        let buffers = Arc::from(buffers);
+        let (_data_type, len, nulls, offset, buffers, _child_data) = 
data.into_parts();
+
+        // first buffer is views
+        let views = buffers[0].clone();
+        // remaining buffers are data buffers
+        let buffers = Arc::from_iter(buffers.into_iter().skip(1));

Review Comment:
   That's about what I figured, but I couldn't find where the validation 
actually happened. Thanks for the 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to