aharpervc commented on code in PR #1809:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1809#discussion_r2056934141
##########
src/parser/mod.rs:
##########
@@ -484,8 +488,18 @@ impl<'a> Parser<'a> {
}
let statement = self.parse_statement()?;
+ expecting_statement_delimiter = match &statement {
+ Statement::If(s) => match &s.if_block.conditional_statements {
+ // the `END` keyword doesn't need to be followed by a
statement delimiter, so it shouldn't be expected here
+ ConditionalStatements::BeginEnd { .. } => false,
+ // parsing the statement sequence consumes the statement
delimiter, so it shouldn't be expected here
+ ConditionalStatements::Sequence { .. } => false,
+ },
+ // Treat batch delimiter as an end of statement, so no
additional statement delimiter expected here
Review Comment:
I've simplified this to reduce it down to only concerns within this PR 👍
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]