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/05/25 19:50:42 UTC

[GitHub] [arrow-datafusion] alamb commented on a change in pull request #339: Speed up `create_batch_from_map`

alamb commented on a change in pull request #339:
URL: https://github.com/apache/arrow-datafusion/pull/339#discussion_r639135446



##########
File path: datafusion/src/scalar.rs
##########
@@ -324,8 +324,8 @@ impl ScalarValue {
     ///
     /// assert_eq!(&array, &expected);
     /// ```
-    pub fn iter_to_array<'a>(
-        scalars: impl IntoIterator<Item = &'a ScalarValue>,
+    pub fn iter_to_array(
+        scalars: impl IntoIterator<Item = ScalarValue>,

Review comment:
       Yeah, this is unfortunate -- I was trying to hard to avoid the need for owned `ScalarValues` -- but I think since `SclarValues` effectively own the underlying storage, if the source data is in some other form, you end up having to create one anyways.
   
   But I think this change is for the better; 👍  




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