peter-toth commented on PR #11683: URL: https://github.com/apache/datafusion/pull/11683#issuecomment-2270712551
@alamb , I just realized that this `CommonSubexprEliminate` is a `ApplyOrder::TopDown` rule: https://github.com/apache/datafusion/blob/main/datafusion/optimizer/src/common_subexpr_eliminate.rs#L690-L692 I have no idea how I missed that fact. Maybe because I was working on parts of the rule where it does call `self.rewrite()` explicitely (organizes recursion itself). I don't get why this rule became `TopDown` in https://github.com/apache/datafusion/pull/10835 and if it is really `TopDown` then why the current code can't deal with `test_non_top_level_common_expression`. Let me convert this PR to draft and look into those... -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org