You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/04/09 08:54:27 UTC
(datafusion-sqlparser-rs) branch gh-readonly-queue/main/pr-2288-504213522c666c1d2b34ff9935a246d971c8dd46 created (now fe88fd1a)
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a change to branch gh-readonly-queue/main/pr-2288-504213522c666c1d2b34ff9935a246d971c8dd46
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git
at fe88fd1a Allow bare columns in GROUPING SETS expressions (#2288)
This branch includes the following new commits:
new fe88fd1a Allow bare columns in GROUPING SETS expressions (#2288)
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org
(datafusion-sqlparser-rs) 01/01: Allow bare columns in GROUPING SETS expressions (#2288)
Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch gh-readonly-queue/main/pr-2288-504213522c666c1d2b34ff9935a246d971c8dd46
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git
commit fe88fd1a46e3cb63301f884921f43dd901d13056
Author: Minjun Kim <48...@users.noreply.github.com>
AuthorDate: Thu Apr 9 17:54:04 2026 +0900
Allow bare columns in GROUPING SETS expressions (#2288)
---
src/parser/mod.rs | 2 +-
tests/sqlparser_common.rs | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/parser/mod.rs b/src/parser/mod.rs
index 6282ed3d..8497dc2e 100644
--- a/src/parser/mod.rs
+++ b/src/parser/mod.rs
@@ -2592,7 +2592,7 @@ impl<'a> Parser<'a> {
if self.dialect.supports_group_by_expr() {
if self.parse_keywords(&[Keyword::GROUPING, Keyword::SETS]) {
self.expect_token(&Token::LParen)?;
- let result = self.parse_comma_separated(|p| p.parse_tuple(false, true))?;
+ let result = self.parse_comma_separated(|p| p.parse_tuple(true, true))?;
self.expect_token(&Token::RParen)?;
Ok(Expr::GroupingSets(result))
} else if self.parse_keyword(Keyword::CUBE) {
diff --git a/tests/sqlparser_common.rs b/tests/sqlparser_common.rs
index 17f368bb..5c46f3cf 100644
--- a/tests/sqlparser_common.rs
+++ b/tests/sqlparser_common.rs
@@ -13109,6 +13109,19 @@ fn test_group_by_grouping_sets() {
);
}
+#[test]
+fn test_group_by_grouping_sets_bare_columns() {
+ all_dialects_where(|d| d.supports_group_by_expr()).one_statement_parses_to(
+ "SELECT a, b FROM t GROUP BY GROUPING SETS (a, b, c)",
+ "SELECT a, b FROM t GROUP BY GROUPING SETS ((a), (b), (c))",
+ );
+
+ all_dialects_where(|d| d.supports_group_by_expr()).one_statement_parses_to(
+ "SELECT a, b FROM t GROUP BY GROUPING SETS ((a, b), c)",
+ "SELECT a, b FROM t GROUP BY GROUPING SETS ((a, b), (c))",
+ );
+}
+
#[test]
fn test_xmltable() {
all_dialects()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org