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 2020/09/27 12:37:37 UTC

[GitHub] [spark] maropu commented on a change in pull request #29585: [WIP][SPARK-32741][SQL] Check if the same ExprId refers to the unique attribute in logical plans

maropu commented on a change in pull request #29585:
URL: https://github.com/apache/spark/pull/29585#discussion_r495568780



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1267,6 +1272,11 @@ class Analyzer(
           val newOutput = oldVersion.generatorOutput.map(_.newInstance())
           Seq((oldVersion, oldVersion.copy(generatorOutput = newOutput)))
 
+        case oldVersion: Union
+            if oldVersion.producedAttributes.intersect(conflictingAttributes).nonEmpty =>
+          val newOutput = oldVersion.unionOutput.get.map(_.newInstance())
+          Seq((oldVersion, oldVersion.copy(unionOutput = Some(newOutput))))

Review comment:
       NOTE: Since `Union` has `unionOutput` in its class fields, we need this entry for dedup as with `Generate`.




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