ygf11 commented on code in PR #4755:
URL: https://github.com/apache/arrow-datafusion/pull/4755#discussion_r1058867664


##########
datafusion/expr/src/utils.rs:
##########
@@ -586,6 +586,12 @@ pub fn from_plan(
             // The preceding part of expr is equi-exprs,
             // and the struct of each equi-expr is like `left-expr = 
right-expr`.
             let new_on:Vec<(Expr,Expr)> = 
expr.iter().take(equi_expr_count).map(|equi_expr| {
+                    // SimplifyExpression rule may add alias to the equi_expr.
+                    let equi_expr = match equi_expr {

Review Comment:
   We can not call the above `unalias`, because it is in the `optimizer` crate 
and `from_plan` is in the `expr` crate.
   
   I found another `unalias` in the `expr` crate, and it seems enough to this 
pr.
   
https://github.com/apache/arrow-datafusion/blob/41c72cf515389e90c20433dbcc4116a59016a15b/datafusion/expr/src/expr.rs#L711-L717
   
   



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

Reply via email to