Commit 19b7b3a
authored
[improvement](nereids)Support GROUP BY ... WITH ROLLUP syntax (#51948)
### What problem does this PR solve?
Support GROUP BY ... WITH ROLLUP syntax
mysql> SELECT year, month, SUM(amount) AS total_amount FROM sales GROUP BY year, month WITH ROLLUP order by year desc, month desc;
+------+-------+--------------+
| year | month | total_amount |
+------+-------+--------------+
| 2024 | 1 | 3400.00 |
| 2024 | NULL | 3400.00 |
| 2023 | 2 | 4000.00 |
| 2023 | 1 | 3000.00 |
| 2023 | NULL | 7000.00 |
| NULL | NULL | 10400.00 |
+------+-------+--------------+
6 rows in set (0.02 sec)1 parent f03dc40 commit 19b7b3a
3 files changed
Lines changed: 39 additions & 1 deletion
File tree
- fe/fe-core/src/main/antlr4/org/apache/doris/nereids
- regression-test
- data/nereids_syntax_p0
- suites/nereids_syntax_p0
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | | - | |
| 1204 | + | |
1205 | 1205 | | |
1206 | 1206 | | |
1207 | 1207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
135 | 164 | | |
136 | 165 | | |
137 | 166 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
| |||
0 commit comments