gatorsmile commented on a change in pull request #24749: [SPARK-27890][SQL]
Improve SQL parser error message for identifier with hyphens
URL: https://github.com/apache/spark/pull/24749#discussion_r289943691
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -158,20 +162,20 @@ statement
| DROP TEMPORARY? FUNCTION (IF EXISTS)? qualifiedName
#dropFunction
| EXPLAIN (LOGICAL | FORMATTED | EXTENDED | CODEGEN | COST)?
statement #explain
- | SHOW TABLES ((FROM | IN) db=identifier)?
+ | SHOW TABLES ((FROM | IN) db=errorCapturingIdentifier)?
(LIKE? pattern=STRING)?
#showTables
- | SHOW TABLE EXTENDED ((FROM | IN) db=identifier)?
+ | SHOW TABLE EXTENDED ((FROM | IN) db=errorCapturingIdentifier)?
LIKE pattern=STRING partitionSpec?
#showTable
| SHOW TBLPROPERTIES table=tableIdentifier
('(' key=tablePropertyKey ')')?
#showTblProperties
| SHOW COLUMNS (FROM | IN) tableIdentifier
- ((FROM | IN) db=identifier)?
#showColumns
+ ((FROM | IN) db=errorCapturingIdentifier)?
#showColumns
| SHOW PARTITIONS tableIdentifier partitionSpec?
#showPartitions
- | SHOW identifier? FUNCTIONS
+ | SHOW errorCapturingIdentifier? FUNCTIONS
Review comment:
This message is also confusing.
----------------------------------------------------------------
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]