Repository navigation
Re-add test 04756 for reading a Nested sibling beside a re-added subcolumn - #113777
PedroTadim merged 3 commits into
Conversation
…olumn PR ClickHouse#113461 reverted ClickHouse#112997 along with its test. The shapes that test covers are fixed by ClickHouse#113225, so the test is re-added on its own to pin that fix, as requested in ClickHouse#112997. Three of its eleven assertions are live witnesses for ClickHouse#113225: reverting that PR's `getSubcolumnsOfNested` and type-computation repairs makes `missing subcolumn first`, `many granules` and `wrapped element types` report 100, 100 and 66 mismatching rows where 0 is correct. The other eight are controls (part type, reader header, prefetch limit, sibling ordering, prefetch off and the Compact-part pair) and are kept as such. The `no-random-merge-tree-settings` tag the pre-revert file carried is dropped. The test already pins `index_granularity`, `min_bytes_for_wide_part` and `min_rows_for_wide_part` in its `CREATE TABLE ... SETTINGS` clause, which takes precedence over runner injection, and `share_nested_offsets` is not randomized at all. Measured 250 randomized runs green without the tag (200 at --jobs 8, 50 at --jobs 1), plus 50 more with `default_compression_codec` forced to ZSTD, since the tag also pinned that codec to LZ4. Keeping CI randomization on is preferable to a blanket opt-out.
The test file was restored from the commit that ClickHouse#113461 reverted, so three of its comments described ClickHouse#112997's implementation rather than the tree the test now runs against. Two of them named prefetch stream ownership: the invariant that a prefetch positions a stream for the column that issued it, so a sibling sharing that stream must still seek. ClickHouse#113461 reverted the mechanism that held it. On master prefetched_streams is again a std::unordered_set<std::string> consulted by a bare contains, with no owner, so a reader that finds a stream prefetched does not seek regardless of which column prefetched it. Both comments now state what the assertions below them actually pin: under share_nested_offsets a re-added Nested member and its siblings share one offsets stream, so the member's group and element types must be rebuilt from metadata or the siblings read wrong values, and that resolution must hold for every mark rather than only the first. The direction matters and is measured. Comparing the committed reference against a build with ClickHouse#113225's repairs reverted, sum(length(nb)) over the re-added member reads 199 on both arms in all three live assertions; every field that moves is a countIf over a sibling. A comment claiming the re-added member reads wrong would be refutable from the test's own reference file. The third is the filesystem_prefetches_limit block, which ran to four lines. The arithmetic it ended with is re-derivable from the queries below it and from the assertion itself, which spells out the same bound, so that line is dropped and the invariant a reader cannot re-derive is kept: read the effective value rather than pinning it, so a restrictive limit fails this test instead of silencing it. Comment text only. No assertion, expected value, setting or table definition changes, and the reference file is untouched.
The test pinned only local_filesystem_read_prefetch, but MergeTreeReaderWide
chooses which of the two flags to read by storage rather than by the flag the
query sets:
bool do_prefetch = data_part_info_for_read->getDataPartStorage()->isStoredOnRemoteDisk()
? settings.read_settings.remote_fs_settings.prefetch
: settings.read_settings.local_fs_settings.prefetch;
so on remote parts the pinned flag was not consulted at all. The s3 stateless
jobs put MergeTree parts on object storage and, unlike the azure job, do not
pass --no-random-settings, while the runner randomizes
remote_filesystem_read_prefetch over 0 and 1. A draw of 0 there removed the
prefetch path from the three assertions that are live without the fix this test
pins, so they would have passed on a binary lacking it; the same draw inverted
the "prefetch off" control, which pinned only the local flag and would then have
run with prefetching enabled.
Both sites now pin the remote flag alongside the local one, keeping their
existing meanings: 1 where the test wants prefetching and 0 in the control. On
a machine with no object storage the addition is inert, since the remote branch
is never taken, so this restores coverage on s3 runs rather than changing what
the test measures locally. No assertion, expected value or table definition
changes and the reference file is untouched.
Internal second-model review (click to expand)Two review rounds over this branch, each with an independent cold reviewer plus a separate ❌ BlockersNone.
|
Pre-PR validation gate (click to expand)
|
|
Workflow [PR], commit [b61f5ba] Summary: ❌
AI ReviewSummaryThis PR re-adds stateless test Final Verdict✅ No new findings. |
|
cc @rienath, could you review this? It re-adds a stateless test that #113461 removed along with #112997: it pins #113225's Nested-member subcolumn grouping and element-type computation, so three of its eleven assertions report mismatching sibling rows if that fix is reverted, and the other eight are controls. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units7 translation units recompiled, 7 s compile time in total, 6 of them have a recent master baseline. |
CI finish ledger - b61f5baEvery failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
All 175 check-runs completed (58 success, 116 skipped, 1 failure);
Session id: cron:our-pr-ci-monitor:20260807-130000 |
8a14c7c
Related: #112997
Related: #113225
Related: #113461
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Tests only. #113461 reverted #112997 together with its test; the shapes that test covers are fixed by #113225, so it is re-added on its own to pin that fix, as asked in #112997.
It is a live witness, not a control. Reverting #113225's
getSubcolumnsOfNestedand type-computation repairs makes three of the eleven assertions report mismatching rows where 0 is correct:missing subcolumn firstmany granuleswrapped element typesDeterministic, three rounds. The remaining eight assertions (part type, reader header, prefetch limit, the two sibling-ordering cases, prefetch off, and the Compact-part pair) hold on both arms and are kept as controls; none was weakened to make the test pass.
The
no-random-merge-tree-settingstag the pre-revert file carried is dropped rather than restored. The test already pinsindex_granularity,min_bytes_for_wide_partandmin_rows_for_wide_partin itsCREATE TABLE ... SETTINGSclause, which takes precedence over runner injection, andshare_nested_offsetsis not randomized at all. Measured 250 randomized runs green without it (200 at--jobs 8, 50 at--jobs 1), plus 50 more withdefault_compression_codecforced toZSTD, since that tag also pinned the codec to LZ4. Keeping randomization on is preferable to a blanket opt-out.The test asserts content, not
length, which the defect preserves, and asserts viaEXPLAIN header = 1that both columns reach the reader, sincequery_plan_remove_unused_columnswould otherwise prune the subcolumn and the shapes would stop exercising the bug.Version info
26.8.1.963(included in26.8and later)