Repository navigation
Commit 3d3cf6b
Add a ClickBench extended query for the shape this rule now rewrites
No benchmark in the repository exercises the path this branch opens, so a
benchmark run against it must report zero change. `SingleDistinctToGroupBy`
needs exactly one distinct argument, so extended q0, q1 and q2 are out on
their own. Standard q8, q10, q11 and q13 hold a lone distinct aggregate that
`main` already rewrites. q9 carries an `AVG`, which the rule has never
accepted. That leaves q22, the one query that reaches the new gate, and its
`COUNT(DISTINCT "UserID")` is over an `Int64`, which has a specialized
`GroupsAccumulator` and so never lands on `GroupsAccumulatorAdapter`.
Extended q14 is that missing shape: a single `COUNT(DISTINCT <string>)` next
to a non-distinct `COUNT(*)`, grouped by a high cardinality string. The
distinct argument has no specialized accumulator, so the unrewritten plan
builds one boxed `Accumulator`, and one hash table, for every group.
Extended queries are discovered from the directory, so this needs no change
to the runner.
Co-Authored-By: Claude Opus 5 <[email protected]>1 parent e0e5a8c commit 3d3cf6b
2 files changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
264 | 293 | | |
265 | 294 | | |
266 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments