Repository navigation
Conversation
The robot cherry-pick of ClickHouse#110584 (backport/25.8/110584, PR ClickHouse#112446) conflicts in 5 files because fillMissingColumns's signature evolved on master after the 25.8 branch cut, and the fix appends a parameter to that same signature. Per-file resolution, keeping 25.8's own API shape: - inplaceBlockConversions.{cpp,h}: keep 25.8's StorageMetadataPtr parameter and append additional_available_columns. share_nested_offsets is dropped: that MergeTree setting does not exist on 25.8 and is not part of this fix. - IMergeTreeReader.cpp: keep 25.8's body, which has no if (!missing) early-out, no converted_requested_columns and no storage_settings member, and thread previous_step_columns through its own unconditional convertToSubcolumns call. - getColumnFromBlock.cpp: keep 25.8's hasDynamicSubcolumns spelling. hasDynamicStructure does not exist in 25.8's IDataType, so the narrower master predicate is not available here. - MergeTreeBlockReadUtils.cpp: keep 25.8's inlined required_columns block and add the parent-injection fall-through open-coded. The add_column lambda and the isTextIndexVirtualColumn / hasMaterializedTextIndex branch that appear in the conflict markers are master-only (0 occurrences anywhere in 25.8's src/), so taking the master side would not compile. The test also drops auto_statistics_types, which does not exist on 25.8. This branch additionally fixes a conversion-order defect that exists only on 25.8. MergeTreeLazilyReader::readLazyColumns ran fillMissingColumns -> evaluateMissingDefaults -> performRequiredConversions, the reverse of MergeTreeReadersChain. That file exists only on 25.8 (master and 26.3 read lazily through LazilyReadFromMergeTree.cpp), so the upstream fix was never exercised against it. With the backported fillMissingColumns guard, an evolved subcolumn slot is left unfilled, and evaluateMissingDefaults then publishes the still part-typed parent under its requested Nullable type. getColumnFromBlock therefore skips the cast and SerializationNullable::enumerateStreams assert_casts a non-nullable column: 'Bad cast from type ColumnVector<wide::integer<256ul, unsigned int>> to ColumnNullable', aborting in debug and sanitizer builds. Pristine 25.8 default-filled instead, so the backport alone would have escalated a wrong-results bug into an abort on a path enabled by default (query_plan_optimize_lazy_materialization = true). Running the conversions first restores the contract the upstream fix was designed against. performRequiredConversions already skips null entries, so the still-unfilled subcolumn slot is unaffected. The 04161 test grows a lazy-materialization arm with a pinned ORDER BY / LIMIT to reach the optimizer; with that change reverted the arm kills the server, so it is a live guard rather than a passing formality. Verified in both directions with a clang-19 Debug build of this tree (25.8 pins clang-19 in ci/defs/defs.py): the official 25.8.29.42 binary produces the pre-fix wrong answers for every subtest of 04161_null_subcolumn_after_metadata_only_nullable_alter, and this tree reproduces the reference output exactly. Co-Authored-By: Claude Fable 5 <[email protected]>
Internal second-model review (3 rounds, all findings resolved)This tree went through three review rounds before I opened the PR. Summary of what was Round 1 — ❌ blocker, this backport would have escalated a wrong-results bug into a
💡 nit — the tuple arm's comment overclaimed. It takes the pre-existing Round 2 — ❌ blocker in the branch's history, not its code. The robot's backport commit Round 3 — clean. 0 findings. Backport-specific checks, since a master-side review cannot cover them: every master-only Validation: official |
|
Workflow [BackportPR], commit [7020630] |
CI finish ledger - 7020630Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task CI is fully finished on this head: 32 check-runs, 0 queued or in progress,
Why this is not caused by this cherry-pick. The failing query is That is fixed on master by #92251, whose squash commit This diff touches none of the analyzer files #92251 changed; it is subcolumn and Session id: cron:our-pr-ci-monitor:20260802-153000 |
|
Follow-up on the Ask: please apply 25.8 is missing two commits, and it is their combination that leaves the branch failing:
Neither is an ancestor of The trigger is not random, which is why this recurs steadily rather than intermittently: Why #91128 rather than the engine fix #92251:
The label expands to 25.8 plus every newer active release, but To be clear about what this buys: the mute stops 25.8 stress from reporting this, but it does |
Internal second-model review (2 rounds, all findings resolved)This deliverable went through the fleet's plan / implement / review pipeline. Gate A passed the Round 0 - 1 blocker, 1 major, 1 nit. All AGREE.
Round 1 - 4 nits, all AGREE, none requiring an implementation round.
Every mechanical claim in the comment was re-measured independently at review: ancestry on all |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed
IS NULL,IS NOT NULLandcountreturning wrong results withoptimize_functions_to_subcolumns = 1when reading a part written before a metadata-onlyALTER TABLE ... MODIFY COLUMN T -> Nullable(T). The.nullsubcolumn is now derived from the present parent column instead of being filled with the storage-type default.Description
The robot cherry-pick of #110584 to 25.8 (#112446) is
CONFLICTINGin 5 files, so the automation cannot merge it. This is the resolved tree as a single commit on the current25.8tip, so it can be merged here or built on directly. Reported bug: #110555.All five conflicts have one cause:
fillMissingColumns's signature evolved on master after the 25.8 branch cut, and the fix appends a parameter to it. The resolution keeps 25.8's API shape:StorageMetadataPtris kept andshare_nested_offsetsdropped (absent here);getColumnFromBlock.cppkeepshasDynamicSubcolumns, sincehasDynamicStructureis not in 25.8'sIDataType; and inMergeTreeBlockReadUtils.cppthe parent injection is open-coded, because theadd_columnlambda andisTextIndexVirtualColumnbranch in the conflict markers are master-only and would not compile. The test dropsauto_statistics_types, also absent here.One change is 25.8-specific rather than a port.
MergeTreeLazilyReader::readLazyColumnsranfillMissingColumnsbeforeperformRequiredConversions, the reverse ofMergeTreeReadersChain; that file exists only on this branch, so the upstream fix was never exercised against it. With the new guard the evolved subcolumn is left unfilled, andevaluateMissingDefaultsthen publishes the still part-typed parent under its requestedNullabletype, soSerializationNullablehitsBad cast from ColumnVector<...> to ColumnNullable. Untreated, the backport would turn a wrong-results bug into a logical error on a path that is on by default. Running the conversions first restores the order the fix was designed against, and04161grows a lazy-materialization arm that kills the server when the reorder is reverted.Validated in both directions with a clang-19 Debug build (25.8's pin): the official
25.8.29.42binary gives the pre-fix wrong answer for every subtest of04161_null_subcolumn_after_metadata_only_nullable_alter, a local build of the pristine branch reproduces that byte-for-byte, and this tree matches the reference exactly. 50 randomized runs of04161and02941_variant_type_alters: 0 failures.