iffyio commented on code in PR #1793: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1793#discussion_r2025399668
########## 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: would it make sense to skip the `supports_in_query_body` flag entirely? thinking since the new representation `SetExpr` is a superset of the old query -- 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