LucaCappelletti94 commented on code in PR #2160:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2160#discussion_r2686017947
##########
src/parser/mod.rs:
##########
@@ -5455,14 +5460,14 @@ impl<'a> Parser<'a> {
&mut self,
or_replace: bool,
temporary: bool,
- ) -> Result<Statement, ParserError> {
+ ) -> Result<CreateFunction, ParserError> {
Review Comment:
I made it so all of these type of function return the strictest concrete
variant, which is the thing they actually return, so that in practice one can
write:
```rust
let my_specific_variant = parse_my_specific_variant(...)?
```
instead of:
```rust
let Statement::MySpecificVariant(my_specific_variant) =
parse_my_specific_variant(...)? else {
unreachable!();
};
```
which seems much cleaner.
--
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]