adamchainz commented on code in PR #1793:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1793#discussion_r2025622523


##########
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:
   I am not sure since that would allow parsing this syntax on dialects that 
don't actually support it, right?



-- 
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]

Reply via email to