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/03/16 15:08:03 UTC
[GitHub] [spark] maropu commented on a change in pull request #31113: [SPARK-34061][SQL] Support push down DISTINCT in Set operations
maropu commented on a change in pull request #31113:
URL: https://github.com/apache/spark/pull/31113#discussion_r595261690
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -1663,8 +1663,12 @@ object ReplaceDeduplicateWithAggregate extends Rule[LogicalPlan] {
/**
* Replaces logical [[Intersect]] operator with a left-semi [[Join]] operator.
* {{{
- * SELECT a1, a2 FROM Tab1 INTERSECT SELECT b1, b2 FROM Tab2
- * ==> SELECT DISTINCT a1, a2 FROM Tab1 LEFT SEMI JOIN Tab2 ON a1<=>b1 AND a2<=>b2
Review comment:
We cannot use column stats (`distinctCount`) to determine whether the optimizer push down it or not?
----------------------------------------------------------------
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