Repository navigation
Commit 7f0c2d2
committed
test: cover grouping set equivalences and constants
On DataFusion 53.1.0 and 55.2.0 with target_partitions = 1, a
GROUPING SETS ((a, b), (a)) query over rows filtered by a = b returned
rows in the wrong ORDER BY order. The grouping-set AggregateExec
projected the input equivalence a = b to its output, but the (a) set
outputs b as NULL, so a = b is false on those rows. EnforceSorting
used the equivalence and rewrote the sort
[a ASC NULLS LAST, b ASC NULLS FIRST] to [b ASC NULLS LAST]. A filter
constant such as b = 1 fails the same way.
apache#24422 fixed this on main by building the properties of a grouping-set
aggregate from empty EquivalenceProperties. Its tests check that
grouping sets do not pick ordered aggregation. Add cases to
grouping.slt for the equivalence, the constant, a row_number() variant
and the query from apache#16965, in the target_partitions = 1 block.
Closes apache#16965.1 parent e4f9b03 commit 7f0c2d2
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