aharpervc commented on code in PR #1808: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1808#discussion_r2042310768
########## src/parser/mod.rs: ########## @@ -15017,6 +15075,13 @@ impl<'a> Parser<'a> { } } + fn parse_return(&mut self) -> Result<Statement, ParserError> { + let expr = self.parse_expr()?; Review Comment: Does this need to be a maybe_parse, like how parse_raise_stmt does it for Exprs? The approach I picked for the discussion of RETURN variants above was to only do what's needed for _this_ PR & _these_ tests, which always have an Expr after the return. So I think perhaps what we'd need in a followup PR is: 1. test case for bare RETURN 2. update this to be use "maybe" logic to find an expr (perhaps we'd like `maybe_expr` to wrap up that pattern?) -- 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