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/03/08 07:30:07 UTC
[GitHub] [spark] dongjoon-hyun commented on a change in pull request #35760: [SPARK-37865][SQL] Fix union deduplication correctness bug
dongjoon-hyun commented on a change in pull request #35760:
URL: https://github.com/apache/spark/pull/35760#discussion_r821389146
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1380,6 +1380,31 @@ class Analyzer(override val catalogManager: CatalogManager)
throw QueryCompilationErrors.invalidStarUsageError("explode/json_tuple/UDTF",
extractStar(g.generator.children))
+ case u @ Union(children, _, _)
+ // if there are duplicate output columns, give them unique expr ids
+ if children.exists(c => c.output.map(_.exprId).distinct.length < c.output.length) =>
Review comment:
nit. two more spaces since this is a continuation of the above `case` statement?
--
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