iffyio commented on code in PR #1809:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1809#discussion_r2099256280


##########
src/parser/mod.rs:
##########
@@ -475,6 +475,10 @@ impl<'a> Parser<'a> {
                     if expecting_statement_delimiter && word.keyword == 
Keyword::END {
                         break;
                     }
+
+                    if expecting_statement_delimiter && word.keyword == 
Keyword::GO {

Review Comment:
   Can we add a clarifying comment here, mentioning that for the `GO` 
statement, it is not necessary that the preceeding statement ends with a 
semicolon (ideally with a sql example)?



##########
src/parser/mod.rs:
##########
@@ -484,8 +488,9 @@ impl<'a> Parser<'a> {
             }
 
             let statement = self.parse_statement()?;
+            // Treat batch delimiter as an end of statement, so no additional 
statement delimiter expected here

Review Comment:
   ```suggestion
               // The `GO` statement optionally ends with a semicolon
   ```
   thinking of a this more straightforward description, it would not be obvious 
to a reader unfamiliar with the statement that 'batch delimiter' is the same 
thing in this context



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

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to