maropu commented on a change in pull request #27567: [SPARK-30822][SQL] Remove 
semicolon at the end of a sql query
URL: https://github.com/apache/spark/pull/27567#discussion_r384189285
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/SparkSqlParserSuite.scala
 ##########
 @@ -251,4 +251,11 @@ class SparkSqlParserSuite extends AnalysisTest {
     assertEqual("ADD FILE /path with space/abc.txt", AddFileCommand("/path 
with space/abc.txt"))
     assertEqual("ADD JAR /path with space/abc.jar", AddJarCommand("/path with 
space/abc.jar"))
   }
+
+  test("statement containing terminal semicolon") {
+    assertEqual(
+      "SELECT a FROM t;",
+      Project(UnresolvedAttribute("a") :: Nil, 
UnresolvedRelation(TableIdentifier("t"))))
+  }
+
 
 Review comment:
   plz remove this blank line.

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