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_r290056024
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ErrorParserSuite.scala
 ##########
 @@ -63,4 +63,46 @@ 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", "^^^")
 
 Review comment:
   Since this test case is for `DDL tests`. we had better have `CREATE/DROP 
DATABASE` and `CREATE/DROP FUNCTION` test coverages, too. Otherwise, we will 
miss like https://github.com/apache/spark/pull/24749/files#r290055158 .

----------------------------------------------------------------
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]

Reply via email to