XiangpengHao commented on code in PR #6039:
URL: https://github.com/apache/arrow-rs/pull/6039#discussion_r1672497088


##########
arrow-cast/src/base64.rs:
##########
@@ -50,7 +50,9 @@ pub fn b64_encode<E: Engine, O: OffsetSizeTrait>(
     assert_eq!(offset, buffer_len);
 
     // Safety: Base64 is valid UTF-8
-    unsafe { GenericStringArray::new_unchecked(offsets, buffer.into(), 
array.nulls().cloned()) }
+    unsafe {
+        GenericStringArray::new_unchecked(offsets, Buffer::from_vec(buffer), 
array.nulls().cloned())

Review Comment:
   Another copy



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