tustvold commented on code in PR #2523:
URL: https://github.com/apache/arrow-datafusion/pull/2523#discussion_r875035905


##########
datafusion/core/src/scalar.rs:
##########
@@ -643,11 +643,11 @@ mod tests {
         // For different data type, `partial_cmp` returns None.
         assert_eq!(
             List(
-                Some(Box::new(vec![Int64(Some(1)), Int64(Some(5))])),
-                Box::new(DataType::Int64),
+                Some(vec![Int64(Some(1)), Int64(Some(5))]),
+                Box::new(DataType::Int32),

Review Comment:
   Why the change in type?



##########
datafusion/common/src/scalar.rs:
##########
@@ -934,16 +928,20 @@ impl ScalarValue {
                         match values {
                             Some(values) => {
                                 // Push value for each field
-                                for c in 0..columns.len() {
-                                    let column = columns.get_mut(c).unwrap();
-                                    column.push(values[c].clone());
+                                for (i, v) in

Review Comment:
   A perhaps more idiomatic way to write this would be something like
   
   ```
   for (column, value) in columns.iter_mut().zip(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: [email protected]

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

Reply via email to