[GitHub] [spark] yeshengm commented on a change in pull request #24749: [SPARK-27890][SQL] Improve SQL parser error message for identifier with hyphens except those in expressions
yeshengm commented on a change in pull request #24749: [SPARK-27890][SQL] Improve SQL parser error message for identifier with hyphens except those in expressions URL: https://github.com/apache/spark/pull/24749#discussion_r290588408 ## File path: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ## @@ -82,13 +82,15 @@ singleTableSchema statement : query #statementDefault | ctes? dmlStatementNoWith #dmlStatement -| USE db=identifier#use -| CREATE database (IF NOT EXISTS)? identifier +| USE db=errorCapturingIdentifier #use +| CREATE database (IF NOT EXISTS)? errorCapturingIdentifier ((COMMENT comment=STRING) | locationSpec | (WITH DBPROPERTIES tablePropertyList))* #createDatabase -| ALTER database identifier SET DBPROPERTIES tablePropertyList #setDatabaseProperties -| DROP database (IF EXISTS)? identifier (RESTRICT | CASCADE)? #dropDatabase +| ALTER database errorCapturingIdentifier +SET DBPROPERTIES tablePropertyList #setDatabaseProperties +| DROP database (IF EXISTS)? db=errorCapturingIdentifier Review comment: done 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: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] [spark] yeshengm commented on a change in pull request #24749: [SPARK-27890][SQL] Improve SQL parser error message for identifier with hyphens except those in expressions
yeshengm commented on a change in pull request #24749: [SPARK-27890][SQL] Improve SQL parser error message for identifier with hyphens except those in expressions URL: https://github.com/apache/spark/pull/24749#discussion_r290571394 ## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala ## @@ -1386,7 +1387,7 @@ class AstBuilder(conf: SQLConf) extends SqlBaseBaseVisitor[AnyRef] with Logging * Create a function database (optional) and name pair. */ protected def visitFunctionName(ctx: QualifiedNameContext): FunctionIdentifier = { -ctx.identifier().asScala.map(_.getText) match { +ctx.identifier.asScala.map(_.getText) match { Review comment: Yeah. I changed the title and added a paragraph to explain. 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: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org