aharpervc commented on code in PR #1809: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1809#discussion_r2042947584
########## src/parser/mod.rs: ########## @@ -475,6 +475,12 @@ impl<'a> Parser<'a> { if expecting_statement_delimiter && word.keyword == Keyword::END { break; } + // Treat batch delimiter as an end of statement + if expecting_statement_delimiter && dialect_of!(self is MsSqlDialect) { + if let Some(Statement::Go { count: _ }) = stmts.last() { + expecting_statement_delimiter = false; + } + } Review Comment: In terms of the code, I worked out a perhaps slightly less confusing way to set whether or not a semi-colon is expected, [here](https://github.com/apache/datafusion-sqlparser-rs/pull/1808/files#diff-fc6a8d66b8cb6bd48a119a70e489cbcef82e7f551e7cf08e8e972ef4e774ef49R487-R493). This branch can be updated accordingly if we agree over there -- 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