iffyio commented on code in PR #1764:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1764#discussion_r1989848061
##########
src/parser/mod.rs:
##########
@@ -10202,19 +10209,25 @@ impl<'a> Parser<'a> {
}
}
+ /// Parse a `WITH` clause, i.e. a `WITH` keyword followed by a `RECURSIVE`
keyword
+ /// and a comma-separated list of CTE declarations.
+ fn parse_with_clause(&mut self) -> Result<With, ParserError> {
+ let with_token = self.get_current_token();
+ Ok(With {
+ with_token: with_token.clone().into(),
+ recursive: self.parse_keyword(Keyword::RECURSIVE),
+ cte_tables: self.parse_comma_separated(Parser::parse_cte)?,
+ })
+ }
Review Comment:
Ah I see, was initially wondering in the diff if i missed something and
figured to double check. yeah I think it we can have it inlined instead, the
new function partially contains the impl since the `WITH` part is parsed
elsewhere which might be a bit confusing, might as well leave it inline i figure
--
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]