You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/02/01 02:18:04 UTC

[GitHub] [spark] maropu commented on pull request #31404: [SPARK-34283][SQL] Combines all adjacent 'Union' operators into a single 'Union' when using 'Dataset.union.distinct.union.distinct'

maropu commented on pull request #31404:
URL: https://github.com/apache/spark/pull/31404#issuecomment-770518381


   How about the case where `dropDuplicates` has different `keys` in each operations like this?
   ```
   val df1 = Seq((1, 2, 3)).toDF("a", "b", "c")
   val df2 = Seq((1, 2, 5)).toDF("a", "b", "c")
   val df3 = Seq((2, 4, 3)).toDF("a", "b", "c")
   val df4 = Seq((1, 4, 5)).toDF("a", "b", "c")
   df1.union(df2).dropDuplicates(Seq("a")).union(df3).dropDuplicates("c").union(df4).dropDuplicates("b")
   ```


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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