Repository navigation
Commit 5f5418e
authored
test: cover grouping set equivalences and constants (apache#26898)
## Which issue does this PR close?
- Closes apache#16965.
## Rationale for this change
I was running PostgreSQL's `groupingsets.sql` against DataFusion and hit
a wrong result on 55.2.0 with `target_partitions = 1`:
```sql
SELECT a, b FROM (VALUES (1, 1), (2, 2)) AS t (a, b) WHERE a = b
GROUP BY GROUPING SETS ((a, b), (a)) ORDER BY a, b NULLS FIRST;
```
It returns `(1,1), (2,2), (1,NULL), (2,NULL)` instead of `(1,NULL),
(1,1), (2,NULL), (2,2)`.
The aggregate kept `a = b` from the filter, although the `(a)` set
outputs `b` as `NULL`, so the sort ran on `b` alone.
apache#24422 already fixed this on main, but no test covers it: with
`compute_properties` instead of `compute_grouping_set_properties` for
grouping sets, all existing tests still pass.
These tests fail with that change.
apache#16965 no longer reproduces on main either, so its query is here too.
## What changes are included in this PR?
Tests only.
## What is the testing strategy for this PR?
The new `grouping.slt` cases pass on main.
## Are there any user-facing changes?
No.
Thanks! cc @2010YOUY011 parent 620d8b3 commit 5f5418e
1 file changed
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 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 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
126 | 190 | | |
127 | 191 | | |
128 | 192 | | |
| |||
0 commit comments