guan404ming commented on code in PR #2202:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2202#discussion_r2781675456
##########
src/parser/mod.rs:
##########
@@ -18260,6 +18261,31 @@ impl<'a> Parser<'a> {
}
}
+ /// Parse a MSSQL `THROW` statement
+ /// See
<https://learn.microsoft.com/en-us/sql/t-sql/language-elements/throw-transact-sql>
+ pub fn parse_throw(&mut self) -> Result<Statement, ParserError> {
+ // THROW with no arguments is a re-throw inside a CATCH block
+ if self.peek_token_ref().token == Token::SemiColon
+ || self.peek_token_ref().token == Token::EOF
+ {
+ return Ok(Statement::Throw {
+ error_number: None,
+ message: None,
+ state: None,
+ });
+ }
Review Comment:
Ok, that makes sense to me. Just moved~
--
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]