tustvold commented on code in PR #6168:
URL: https://github.com/apache/arrow-rs/pull/6168#discussion_r1700446557


##########
arrow-select/src/take.rs:
##########
@@ -485,13 +485,20 @@ fn take_byte_view<T: ByteViewType, IndexType: 
ArrowPrimitiveType>(
     array: &GenericByteViewArray<T>,
     indices: &PrimitiveArray<IndexType>,
 ) -> Result<GenericByteViewArray<T>, ArrowError> {
+    let data_len = indices.len();
+
     let new_views = take_native(array.views(), indices);
     let new_nulls = take_nulls(array.nulls(), indices);
-    Ok(GenericByteViewArray::new(
-        new_views,
-        array.data_buffers().to_vec(),
-        new_nulls,
-    ))
+
+    let array_data = ArrayData::builder(T::DATA_TYPE)

Review Comment:
   In general I think ArrayData should be avoided in new code, it is easy to 
use incorrectly, and since #4061 it is a slower way to construct an array



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