You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/05 19:13:33 UTC

[GitHub] [spark] samsetegne commented on a change in pull request #27567: [SPARK-30822][SQL] Remove semicolon at the end of a sql query

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

 ##########
 File path: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
 ##########
 @@ -64,7 +64,7 @@ grammar SqlBase;
 }
 
 singleStatement
-    : statement EOF
+    : statement (';')*? EOF
 
 Review comment:
   @cloud-fan I would expect the most common scenario would be the user unintentionally submitted an extra semicolon. Do you think the query should fail in that case or is the intention so obvious that it's essentially explicit? In cases where multiple statements are allowed i.e. spark-sql, would the additional semicolons just equate to empty statements that are ignored or would something else happen that could have an effect on performance?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org