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 2022/04/01 00:02:28 UTC

[GitHub] [arrow-rs] viirya commented on a change in pull request #1507: Add `new_from_strings` to create `MapArrays`

viirya commented on a change in pull request #1507:
URL: https://github.com/apache/arrow-rs/pull/1507#discussion_r840116730



##########
File path: arrow/src/array/array_map.rs
##########
@@ -152,6 +155,44 @@ impl MapArray {
             value_offsets,
         })
     }
+
+    /// Creates map array from provided keys, values and entry_offsets.
+    pub fn new_from_strings<'a>(
+        keys: impl Iterator<Item = &'a str>,
+        values: ArrayData,

Review comment:
       Hmm, if we make it `values: &dyn Array`, how can we call `StructArray::from`? We cannot move `values`.




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