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/09 09:21:46 UTC

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

zzcclp commented on a change in pull request #31404:
URL: https://github.com/apache/spark/pull/31404#discussion_r572718163



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -147,6 +147,9 @@ abstract class Optimizer(catalogManager: CatalogManager)
       RewriteNonCorrelatedExists,
       ComputeCurrentTime,
       GetCurrentDatabaseAndCatalog(catalogManager),
+      // Before replace 'Deduplicate(Keys, Union)' with Aggregate, it needs to
+      // combine all adjacent 'Union' operators into a single 'Union' if necessary.
+      CombineUnions,
       ReplaceDeduplicateWithAggregate) ::

Review comment:
       I am not sure it's ok to move rule 'ReplaceDeduplicateWithAggregate' to the Replace Operators batch, I will check.




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