dongjoon-hyun 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_r289656444
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ErrorParserSuite.scala
##########
@@ -63,4 +63,47 @@ class ErrorParserSuite extends SparkFunSuite {
"Combination of ORDER BY/SORT BY/DISTRIBUTE BY/CLUSTER BY is not
supported",
"^^^")
}
+
+ test("hyphen in identifier - DDL tests") {
+ val msg = "unquoted identifier"
+ // ddl tests
+ intercept("use test-test", 1, 8, 9, msg + " test-test", "^^^")
+ intercept("CREATE TABLE test (attri-bute INT)", 1, 24, 25, msg + "
attri-bute", "^^^")
+ intercept("CREATE TABLE test (attri-bute INT)", 1, 24, 25, msg + "
attri-bute", "^^^")
Review comment:
Duplicated lines (71 and 72)?
----------------------------------------------------------------
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]