You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/20 21:13:25 UTC

[GitHub] [arrow] Dandandan commented on a change in pull request #9279: ARROW-11332: [Rust] Use MutableBuffer in take_string instead of Vec

Dandandan commented on a change in pull request #9279:
URL: https://github.com/apache/arrow/pull/9279#discussion_r561307105



##########
File path: rust/arrow/src/compute/kernels/take.rs
##########
@@ -423,7 +423,7 @@ where
     let mut offsets_buffer = MutableBuffer::from_len_zeroed(bytes_offset);
 
     let offsets = offsets_buffer.typed_data_mut();
-    let mut values = Vec::with_capacity(bytes_offset);
+    let mut values = MutableBuffer::new(0);

Review comment:
       Used to be here `bytes_offset` but that doesn't make a lot of sense.
   The values array could be empty as well (e.g. for empty strings), or have a different capacity altogether.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org