jonmmease commented on a change in pull request #1091:
URL: https://github.com/apache/arrow-datafusion/pull/1091#discussion_r725960776



##########
File path: datafusion/src/scalar.rs
##########
@@ -1171,6 +1277,20 @@ impl FromStr for ScalarValue {
     }
 }
 
+impl From<Vec<(&str, ScalarValue)>> for ScalarValue {
+    fn from(value: Vec<(&str, ScalarValue)>) -> Self {
+        let mut fields: Vec<Field> = Vec::new();
+        let mut scalars: Vec<ScalarValue> = Vec::new();
+
+        value.iter().for_each(|(name, scalar)| {
+            fields.push(Field::new(name, scalar.get_datatype(), false));
+            scalars.push(scalar.clone());
+        });

Review comment:
       Ahh, I hadn't realized Rust had an unzip.  Thanks for the suggestion. 
Done in 459c029




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to