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 2022/02/24 13:48:41 UTC

[GitHub] [spark] chenzhx commented on a change in pull request #35649: [SPARK-37932][SQL]Fix DeduplicateRelations bug when using join in dup…

chenzhx commented on a change in pull request #35649:
URL: https://github.com/apache/spark/pull/35649#discussion_r813895362



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/DeduplicateRelations.scala
##########
@@ -223,6 +223,11 @@ object DeduplicateRelations extends Rule[LogicalPlan] {
         if findAliases(aggregateExpressions).size == aggregateExpressions.size =>
         Nil
 
+      case oldVersion @ Filter(condition, _)
+          if condition.references.intersect(left.outputSet).nonEmpty =>
+        val newVersion = oldVersion.copy(condition = condition)

Review comment:
       You mean mean to write directly as Seq(oldVersion, oldVersion) ?




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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