You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2024/12/01 12:12:20 UTC

Re: [PR] deduplicate variadic buffers in MutableArrayData::extend for ByteView arrays [arrow-rs]

alamb commented on code in PR #6808:
URL: https://github.com/apache/arrow-rs/pull/6808#discussion_r1864871174


##########
arrow-data/src/transform/mod.rs:
##########
@@ -627,13 +628,19 @@ impl<'a> MutableArrayData<'a> {
             _ => (None, false),
         };
 
-        let variadic_data_buffers = match &data_type {
-            DataType::BinaryView | DataType::Utf8View => arrays
-                .iter()
-                .flat_map(|x| x.buffers().iter().skip(1))
-                .map(Buffer::clone)
-                .collect(),
-            _ => vec![],
+        let (variadic_data_buffers, buffer_to_idx) = match &data_type {
+            DataType::BinaryView | DataType::Utf8View => {
+                let mut buffer_to_idx = HashMap::new();

Review Comment:
   I think the ones in cast are probably a good place to start



-- 
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: github-unsubscribe@arrow.apache.org

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