LantaoJin commented on a change in pull request #35168:
URL: https://github.com/apache/spark/pull/35168#discussion_r783595256
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveUnion.scala
##########
@@ -208,6 +208,17 @@ object ResolveUnion extends Rule[LogicalPlan] {
_.containsPattern(UNION), ruleId) {
case e if !e.childrenResolved => e
+ case Union(children, false, false)
+ // the first child of Union has duplicate columns
+ if children.head.output.distinct.length < children.head.output.length
=>
Review comment:
How about `select a, A` in a case-sensitive or case-insensitive analyzer?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]