iffyio commented on code in PR #1793: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1793#discussion_r2027491945
########## src/parser/mod.rs: ########## @@ -3744,10 +3744,18 @@ 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 { - expr: Box::new(expr), - subquery: self.parse_query()?, - negated, + if self.dialect.supports_in_query_body() { + Expr::InSubquery { + expr: Box::new(expr), + subquery: self.parse_query_body(self.dialect.prec_unknown())?, + negated, + } + } else { + Expr::InSubquery { + expr: Box::new(expr), + subquery: Box::new(SetExpr::Query(self.parse_query()?)), + negated, + } } Review Comment: Ah yeah I think that would be fine to have the parser always accept the syntax -- 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