Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13095#discussion_r63425710
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
 ---
    @@ -127,10 +127,8 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] 
with Logging {
           }
     
           // Check for duplicate names.
    -      ctes.groupBy(_._1).filter(_._2.size > 1).foreach {
    -        case (name, _) =>
    -          throw new ParseException(
    -            s"Name '$name' is used for multiple common table expressions", 
ctx)
    +      ctes.groupBy(_._1).filter(_._2.size > 1).foreach { case (name, _) =>
    --- End diff --
    
    Lets just add a `checkDuplicateKeys` method to ParseUtils (or something 
similar), and not call the same piece of code 3 times. . What do you think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to