peter-toth commented on code in PR #11357:
URL: https://github.com/apache/datafusion/pull/11357#discussion_r1674236397


##########
datafusion/optimizer/src/common_subexpr_eliminate.rs:
##########
@@ -937,14 +935,14 @@ impl<'n> ExprIdentifierVisitor<'_, 'n> {
     ///   information up from children to parents via `visit_stack` during the 
first,
     ///   visiting traversal and no need to test the expression's validity 
beforehand with
     ///   an extra traversal).
-    fn pop_enter_mark(&mut self) -> (usize, bool, Option<Identifier<'n>>, 
bool) {
+    fn pop_enter_mark(&mut self) -> (usize, Option<Identifier<'n>>, bool) {

Review Comment:
   Previously, we needed the flag as we did stop recursion at the root node of 
a conditional subtree in `f_down()` and we had to store that piece of 
information in `visit_stack` so as to remember to compute the hash of the whole 
conditional subtree in `f_up()` (when we built the root node's identifier).
   
   We no longer need that flag anywhere as we now recurse into conditional 
subtrees too.



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

Reply via email to