Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22957#discussion_r237887275
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/PlannerSuite.scala ---
    @@ -780,6 +780,23 @@ class PlannerSuite extends SharedSQLContext {
             classOf[PartitioningCollection])
         }
       }
    +
    +  test("SPARK-25951: avoid redundant shuffle on rename") {
    --- End diff --
    
    ah, good point and indeed very useful. In my previous tests I always used a 
very simple query to verify this and never the one reported in the JIRA. Now I 
tried that one and I realized that this fix is not very useful as of now, 
because in renaming like that in the `HashPatitioning` there is the 
`AttributeReference` to the `Alias`, rather than the `Alias` itself. Since that 
is the common case, the PR as it is now it is not very useful. If I won't be 
able to figure out a good way for that, I am going to close this. Thanks and 
sorry for the trouble.


---

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

Reply via email to