aharpervc commented on code in PR #1809:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1809#discussion_r2056929658
##########
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 suspect so... need to investigate. (I need to rebuild my mental model on
this first 😆).
--
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]