peter-toth commented on code in PR #10832:
URL: https://github.com/apache/datafusion/pull/10832#discussion_r1632034489
##########
datafusion/optimizer/src/common_subexpr_eliminate.rs:
##########
@@ -696,7 +696,8 @@ impl<'n> TreeNodeVisitor<'n> for ExprIdentifierVisitor<'_> {
return Ok(TreeNodeRecursion::Jump);
}
- self.id_array.push((0, "".to_string()));
+ self.id_array
Review Comment:
Why do we need to store this boolean flag in `id_array` during the first
traversal here? Can we just call `self.aliased |= matches!(expr,
Expr::Alias(_))` during the second traversal in `f_down()` of
`CommonSubexprRewriter`?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]