alamb commented on code in PR #8956:
URL: https://github.com/apache/arrow-datafusion/pull/8956#discussion_r1463174154


##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -375,10 +375,10 @@ impl Optimizer {
 
         let new_inputs = result
             .into_iter()
-            .enumerate()
-            .map(|(i, o)| match o {
+            .zip(inputs)

Review Comment:
   One difference with `zip` is that it will silently ignore items if the 
iterators are different lengths. I reviewed this code and in this case even if 
results is shorter than inputs (an error) the current code wouldn't error either
   
   Thus I think this is equivalent



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