wiedld commented on code in PR #9685:
URL: https://github.com/apache/arrow-datafusion/pull/9685#discussion_r1531567569


##########
datafusion/optimizer/src/common_subexpr_eliminate.rs:
##########
@@ -719,23 +741,10 @@ impl TreeNodeRewriter for CommonSubexprRewriter<'_> {
                         ));
                     }
 
-                    let (series_number, id) = &self.id_array[self.curr_index];

Review Comment:
   This was one of the bugs (see the regression test). It uses an already 
incremented `self.curr_index`. The fix is to grab all of the values once (see 
new line 717), before all the `self.curr_index` shenanigans.



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