iffyio commented on code in PR #1793: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1793#discussion_r2029711949
########## src/parser/mod.rs: ########## @@ -3742,24 +3742,23 @@ impl<'a> Parser<'a> { }); } self.expect_token(&Token::LParen)?; - let in_op = if self.parse_keyword(Keyword::SELECT) || self.parse_keyword(Keyword::WITH) { - self.prev_token(); - Expr::InSubquery { + let in_op = match self.try_parse(|p| p.parse_query_body(p.dialect.prec_unknown())) { Review Comment: Yeah this makes sense! ########## src/parser/mod.rs: ########## @@ -3742,24 +3742,23 @@ impl<'a> Parser<'a> { }); } self.expect_token(&Token::LParen)?; - let in_op = if self.parse_keyword(Keyword::SELECT) || self.parse_keyword(Keyword::WITH) { - self.prev_token(); - Expr::InSubquery { + let in_op = match self.try_parse(|p| p.parse_query_body(p.dialect.prec_unknown())) { Review Comment: Can we use `self.maybe_parse()` instead of `try_parse()`? that would automatically handle the recursion exceeded case for example -- 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