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



##########
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:
       > I guess I was thinking we could use array.data() to get the ArrayData 
needed to construct the StructArray
   
   Got it. `data()` returns `&ArrayData`, so we need a `clone` here, but I 
think it should be fine as it won't copy array data.




-- 
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-unsubscr...@arrow.apache.org

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


Reply via email to