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


##########
datafusion/optimizer/src/common_subexpr_eliminate.rs:
##########
@@ -656,24 +656,16 @@ enum VisitRecord {
     EnterMark(usize),
     /// the node's children were skipped => jump to f_up on same node
     JumpMark,
-    /// Accumulated identifier of sub expression.
-    ExprItem(Identifier),
 }
 
 impl ExprIdentifierVisitor<'_> {
     /// Find the first `EnterMark` in the stack, and accumulates every 
`ExprItem`
     /// before it.
-    fn pop_enter_mark(&mut self) -> Option<(usize, Identifier)> {
-        let mut desc = String::new();
-
-        while let Some(item) = self.visit_stack.pop() {
+    fn pop_enter_mark(&mut self) -> Option<usize> {

Review Comment:
   > I am still a little unclear on if the bug you described above is something 
that can actually be hit in practice (due to lack of a test case), or if it 
will be masked by #10413
   
   That's a good question. I think once #10413 gets resolved we can hit the 
identifier collision issue. Actually, let's try to add an identifier collision 
test case after #10413.
   
   I would suggest 1. and a new version of this PR where only the aliases are 
made simpler.



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