dongjoon-hyun commented on a change in pull request #24949:
[SPARK-28002][SQL][FOLLOWUP] Add more WITH test cases
URL: https://github.com/apache/spark/pull/24949#discussion_r300580542
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -129,7 +129,12 @@ class AstBuilder(conf: SQLConf) extends
SqlBaseBaseVisitor[AnyRef] with Logging
(namedQuery.alias, namedQuery)
}
// Check for duplicate names.
- checkDuplicateKeys(ctes, ctx)
+ val duplicates = ctes.groupBy(_._1).filter(_._2.size > 1).keys
+ if (duplicates.nonEmpty) {
+ throw new ParseException(
Review comment:
Actually, this is the more important change than `adding test case`. Could
you update the PR title?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]