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


##########
arrow-row/src/variable.rs:
##########
@@ -268,3 +268,30 @@ pub unsafe fn decode_string<I: OffsetSizeTrait>(
     // Row data must have come from a valid UTF-8 array
     GenericStringArray::from(builder.build_unchecked())
 }
+
+/// Decodes a binary view array from `rows` with the provided `options`
+pub fn decode_binary_view(rows: &mut [&[u8]], options: SortOptions) -> 
BinaryViewArray {
+    let decoded: GenericBinaryArray<i64> = decode_binary(rows, options);
+
+    // Better performance might be to directly build the binary view instead 
of building to BinaryArray and then casting
+    // I suspect that the overhead is not a big deal.

Review Comment:
   If lots of the strings are < 12 bytes I can see the difference being 
meaningful



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