Commit d070a8b
## Which issue does this PR close?
- Closes #22621.
## Rationale for this change
`push_down_filter_regression.slt` (added in #22150) asserts the exact
`DynamicFilter` content rendered by `EXPLAIN ANALYZE` on the `agg_dyn_*`
fixtures. That content is **not** deterministic: the filter threshold
tightens
as each `AggregateExec(mode=Partial)` publishes its running `min`/`max`,
and the
`EXPLAIN ANALYZE` snapshot can be taken while the filter is still
converging.
For `agg_dyn_single`, `file_0` holds the global `min` (1) and `file_1` a
larger
partial `min` (3). If the snapshot lands after `file_1` publishes `3`
but before
`file_0` publishes `1`, the filter reads `a < 3` instead of the final `a
< 1` —
exactly the intermittent CI failure reported in #22621. The fixture's
comment
incorrectly claimed the filter *content* was deterministic and only the
pruning
*counts* raced.
## What changes are included in this PR?
Make the filter content independent of publish order by giving **every
file the
same per-file min/max**, so any snapshot equals the fully converged
filter:
- `agg_dyn_single` — both files `(1), (8)` → each file `min=1, max=8`.
- `agg_dyn_two_col` — each file `min(a)=1, max(b)=9`.
- `agg_dyn_mixed` — each file `min(a)=1, max(a)=8, max(b)=12`.
`agg_dyn_two_col` and `agg_dyn_mixed` were not in the reported failure
but shared
the same latent race (differing per-file extremes), so they are fixed
too.
`agg_dyn_nulls` is left untouched — its filter is always `true` and
never races.
The expected plan text is **unchanged**; only the input data and the
misleading
comments are modified. The alternative of forcing a single partition was
rejected: dynamic aggregate filters are only emitted in `Partial+Final`
mode
(`target_partitions >= 2`), so a single partition would emit no filter
at all.
## Are these changes tested?
Yes — the modified `push_down_filter_regression.slt` itself is the test.
It
passes, and because the asserted filter content no longer depends on
partition
scheduling, it is stable across runs (verified by running it repeatedly
locally).
## Are there any user-facing changes?
No. Test-only change.
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
1 parent 217fd95 commit d070a8b
1 file changed
Lines changed: 22 additions & 9 deletions
Lines changed: 22 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
279 | 287 | | |
280 | 288 | | |
281 | 289 | | |
282 | | - | |
| 290 | + | |
283 | 291 | | |
284 | 292 | | |
285 | 293 | | |
286 | 294 | | |
287 | 295 | | |
288 | | - | |
| 296 | + | |
289 | 297 | | |
290 | 298 | | |
291 | 299 | | |
| |||
296 | 304 | | |
297 | 305 | | |
298 | 306 | | |
299 | | - | |
| 307 | + | |
300 | 308 | | |
301 | | - | |
302 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
303 | 312 | | |
304 | 313 | | |
305 | 314 | | |
| |||
350 | 359 | | |
351 | 360 | | |
352 | 361 | | |
| 362 | + | |
| 363 | + | |
353 | 364 | | |
354 | 365 | | |
355 | 366 | | |
356 | | - | |
| 367 | + | |
357 | 368 | | |
358 | 369 | | |
359 | 370 | | |
360 | 371 | | |
361 | 372 | | |
362 | | - | |
| 373 | + | |
363 | 374 | | |
364 | 375 | | |
365 | 376 | | |
| |||
384 | 395 | | |
385 | 396 | | |
386 | 397 | | |
| 398 | + | |
| 399 | + | |
387 | 400 | | |
388 | 401 | | |
389 | 402 | | |
390 | | - | |
| 403 | + | |
391 | 404 | | |
392 | 405 | | |
393 | 406 | | |
| |||
0 commit comments