Repository navigation
test: native_fetch_projection gets its pytest twin, and its source arms read code, not the comment that says the call was removed (#1341) - #1487
Conversation
… the node stops taking is a red, not a skip (#1341) test_native_groupagg_batch.py carries all 69 checks by the shell's name in eight tests. Under each of twelve mutations of the grouped fold, the twin reddens exactly the shell's set of checks, by name. A query that errors is read as a value, not raised, because two of the mutations (the by-value gate and the expression-key gate dropped) make the columnar query fail. Without that the twin errored and named nothing. The shell changes in two places: - The decline arms. When the grouped node was not planned, the arm read check_skip. It never fired on 15-19, and with the node gone the gate under test is unreachable, so the skip was a silent pass. It is now a red under the arm's own name. Measured with the planner refusing a text key: the old suite reports 68 passed + 1 skipped and exits 0, the new one reddens "text key: the fold declined". - A rename. "skipped vectors: four payload columns all stay in step" read only the fold's yes/no; the next arm compares the sums. Only the fold-removal mutation reddens it, so it is now "skipped vectors: the fold ran on the four-payload arm". The suite had no ledger rows. COMPLETE gains native_groupagg_batch, and its literal tables join the loop-reader guard's list. TESTS.md section 165, cluster_tests 710 -> 718. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…twelve grouped-fold mutations (#1341) The suite had no rows. suites_not_covered 201 -> 200; census 4171 rows / 2980 never / 1191 dated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ms read code, not the comment that says the call was removed (#1341) test_native_fetch_projection.py carries all 18 checks by the shell's name in four tests. Under each of six mutations, the twin reddens exactly the shell's set of checks, by name. "index deletion asks whether the row is live" passed on a comment. pgcolumnar_index_delete_tuples stopped asking any row (it vouches for nothing, since an answer from this backend's snapshot erased index entries of rows live to everyone else). The only PgColumnarRowIsLive left in it is in the comment that explains why. Every source arm now reads the file through code_of, which blanks C comments and keeps string literals. The arm asserts what is true now: "index deletion asks no row whether it is live: it vouches for nothing", with a premise that the function was extracted. Measured with the per-row liveness check put back: the old suite passes 17/17, and the new arm is red in both twins. "the wide fixture has 41 columns" is now a literal name, so the grader can read it; the all-covering projection already names c1..c40. COMPLETE gains native_fetch_projection. TESTS.md section 166, cluster_tests 718 -> 722. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… seven fetch-path mutations (#1341) The suite had no rows. suites_not_covered 200 -> 199; census 4189 rows / 2990 never / 1199 dated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jdatcmd
left a comment
There was a problem hiding this comment.
Approve, at 53543d7 (its own commits: dd6cfe1, 53543d7, on #1485).
My own mutant, different from your eight: in reconstruct_via_projection, the covered-column copy (columnar_projection.c, isnull = rnulls[covered[i]]) also reports NULL for the first projected column on every 50th row number. PG17:
- shell:
every reconstructed row matches the base table: got [400] want [0]; - pytest: the same,
got 400 want 0.
So the reconstruct arm catches a covered value going wrong, not only a missing uncovered column.
Note, not blocking: "and its values are right with nothing decoded from the base" (the all-covering projection) stayed green under that mutant, and it's one of the rows you enter as never. I didn't dig into whether its fixture just has no row number divisible by 50, or whether it compares something narrower than the values. Worth a look when you next touch it.
Also checked:
- The
code_ofcomment-blanking fix is the right direction, and "asks no row whether it is live" now states the current design. - This PR's own diff is the 7 files over #1485.
Merge order: I'll merge #1485 first, then this.
|
@OffgridwithJD, merging #1487 now: approved at 53543d7, 15/15 green, CLEAN. |
@jdatcmd The next twin-less suite, stacked on #1485 (merge that first; this PR's own commits are the top two).
A source arm that passed on a comment
native_fetch_projection.shchecked "index deletion asks whether the row is live" by findingPgColumnarRowIsLiveinpgcolumnar_index_delete_tuples. The function stopped asking any row: it vouches for nothing, because an answer from this backend's snapshot erased index entries of rows that are live to everyone else. The onlyPgColumnarRowIsLiveleft in it is in the comment explaining that removal, so the arm was green on prose.code_of, which blanks C comments and keeps string literals (checked on a"x\"/*y"literal). The stale arm asserts what's true now: "index deletion asks no row whether it is live: it vouches for nothing", with a premise that the function was extracted. Only this arm's counts changed under comment-stripping; the rest are the same with or without comments.The twin, name for name
All 18 checks by the shell's name, in four tests. Under each mutation, the twin reddens exactly the shell's set (measured with a soft-expect runner):
read_projectionignores liveness"the wide fixture has 41 columns" is now a literal name, because the grader can't read
$((NCOLS + 1)). The all-covering projection already names c1..c40.Five-major runs at head: 18/18 for the shell and 18/18 for the twin, on each of 15–19.
Ledger
Census 4189 / 2990 never / 1199 dated (on #1485's 4171 / 2980 / 1191), with suites_not_covered 200 → 199. 8 of the 18 checks are dated. The gate gives rc 0, and orphan-scan finds 0. 10 arrive never:
Collection gives
cluster_tests 718 -> 722, and TESTS.md gets §166. The guards pass 438/438 and the grader 40/40.🤖 Generated with Claude Code