Repository navigation
test: a NULL key counts as a group in the bucket bound (#1330 review) - #1332
Conversation
|
Pushed abf9fb2. This closes the gap I reported on #1330: the pytest twin missed the bound-without-row-count mutation. Why it missed: once the mutated gate let the skewed key through, the grouped path lost to the ordinary plan on cost, so nothing errored. Both twins' gate helpers now set PG17, both twins, at this head:
Every mutation is now caught by both twins. Runs on the other majors follow before I ask for review. |
OffgridwithJD
left a comment
There was a problem hiding this comment.
Approved at bd5b734. Both twins carry the arm, each with its own rows; the shell one is my repro from #1330, and the pytest one uses other second offsets and 40 rows a group. The row count (200 and 160) is well over the cap, so only the NULL group can decline it.
On PG17 at this head: native_groupagg.sh 90 passed + 1 skip (ICU, absent here), and test_native_groupagg.py 19 passed, the new test included. I relied on your red runs for the mutation; I'd seen the same error myself on #1330 with *withNull *= one.
|
A correction to my approval: it says bd5b734, but it attached to abf9fb2, because you pushed while I was running. I've now run abf9fb2 too, on PG17: abf9fb2 also turns hash aggregation and sorting off in the gate helpers, so the gate arms measure the gate rather than the cost model. That closes the pytest-twin gap you reported on #1330, where the row-count mutation lost on cost and stayed green. I haven't rerun that mutation myself. |
@OffgridwithJD's shape: three minute buckets fill the bucket bound exactly, and NULL rows add a fourth group. Under a cap of 3 a bound without the NULL group takes the path and errors; with it the path is declined and the four groups are answered. In both twins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bound-without-row-count mutation stayed green in the pytest twin: its skewed table, once the mutated gate let it through, lost to the ordinary plan on cost, so nothing errored. Both twins' gate helpers now turn hash aggregation and sorting off, so the grouped path wins whenever the gate offers it; a declined query still runs, on the disabled plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@OffgridwithJD, rebased onto 614eb02 (#1331) at e4ca93b. The only conflict was |
abf9fb2 to
e4ca93b
Compare
|
@OffgridwithJD, a small ask: your approval is at abf9fb2, and the head is e4ca93b after the rebase onto #1331. The only change is |
|
Merging: approved by @OffgridwithJD at e4ca93b, and CI is green on that head. |
This adds the arm @OffgridwithJD asked for in the #1330 review. It shows that the +1 for NULL in the bucket bound carries weight. The change is tests only.
The arm, in both twins
Rows at 00:00:59, 00:01:30 and 00:02:00 fill the one-minute bucket bound of 3 exactly:
floor(61 s / 60 s) + 2. NULL rows add a fourth group. Undergroupagg_max_groups = 3:exceeded pgcolumnar.groupagg_max_groups (3).The row count can't decline it, because the table has 200 rows (the pytest twin, 160), well over the cap.
Evidence
Red with the NULL group removed (
*withNull *= one), on PG17:got [ERROR: grouped vectorized aggregate exceeded pgcolumnar.groupagg_max_groups (3)] want [4];Green at bd5b734:
native_groupagg.sh: 90/90 on 15, 16, 17 and 19 (1 skip where ICU is absent), and 92/92 on 18.test_native_groupagg.py: 19 passed on each of 15–19.test_docs_cover_the_corpus.py: green.Bookkeeping: TESTS.md gains a row for the new test.
cluster_testsgoes from 527 to 528 by collection: 947 tests, 419 guard + 528 cluster. None of these suites has ledger rows.🤖 Generated with Claude Code