Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21184#discussion_r202077386
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ---
    @@ -284,6 +288,80 @@ class Analyzer(
         }
       }
     
    +  /**
    +   * Replaces [[Alias]] with the same exprId but different references with 
[[Alias]] having
    +   * different exprIds. This is a rare situation which can cause incorrect 
results.
    +   */
    +  object DeduplicateAliases extends Rule[LogicalPlan] {
    --- End diff --
    
    I feel the root cause is in `FoldablePropagation`. We should only replace 
attribute with literal from children, not siblings. 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to