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 a
`self.curr_index` which has already been incr, when it really needs the
original `self.curr_index` for the current expr node being visited. The fix is
to grab all of the `IdArray[self.curr_index]` values once (see new line 717),
before all the `self.curr_index` incr 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]