wugeer commented on code in PR #1653:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1653#discussion_r1954497259


##########
src/parser/mod.rs:
##########
@@ -9092,6 +9092,16 @@ impl<'a> Parser<'a> {
                     });
                 }
             }
+            if self.dialect.supports_group_by_special_grouping_sets()
+                && self.parse_keywords(&[Keyword::GROUPING, Keyword::SETS])
+            {
+                self.expect_token(&Token::LParen)?;
+                let result = self.parse_comma_separated(|p| 
p.parse_tuple(true, true))?;

Review Comment:
   @iffyio In my local environment, the SQL query 'SELECT a, b, SUM(c) FROM 
tab1 GROUP BY a, b GROUPING SETS ((a, b), a, b, ())' executes perfectly fine.
   
![图片](https://github.com/user-attachments/assets/bf22debe-96fd-47e1-a292-54f292eddda9)
   The SQL query 'SELECT a, b, SUM(c) FROM tab1 GROUP BY a, b GROUPING SETS 
((a, b), (a), (b), ())' also executes correctly.
   
![图片](https://github.com/user-attachments/assets/e8b34772-9553-414a-ad92-bcaec773d21c)
   



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

Reply via email to