Skip to content

Cherry pick #88860 to 25.9: Fix premature TTL column removal causing merge failures and wrong defaults - #92259

Merged
robot-ch-test-poll merged 22 commits into
backport/25.9/88860from
cherrypick/25.9/88860
Dec 18, 2025
Merged

robot-ch-test-poll merged 22 commits into
backport/25.9/88860from
cherrypick/25.9/88860

Conversation

@robot-ch-test-poll3

Copy link
Copy Markdown
Contributor

Original pull-request #88860

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

amosbird and others added 21 commits October 21, 2025 21:33
…aults.

When column-level TTLs expired, columns were sometimes removed too early
(before DEFAULT expression evaluation or before merge-time transforms that
expect them to exist). As a result:

- Missing columns were filled with **type defaults** instead of the column’s
  **table-defined DEFAULT** expression.
- Skip index statistics became incorrect because indexes were computed using
  wrong default values.
- Merge algorithms depending on certain columns (e.g. GraphiteMergeTree’s
  `Timestamp`, VersionedCollapsingMergeTree’s `sign`, ReplacingMergeTree’s
  `version`, or AggregatingMergeTree’s state columns) could fail with
  `Not found column ... in block` errors.

Now TTL-expired columns are properly handled.
Fix premature TTL column removal causing merge failures and wrong defaults
@robot-ch-test-poll3 robot-ch-test-poll3 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Dec 16, 2025
@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

Dear @amosbird, @jkartseva, the PR is not updated for 1d0h57m4s. Please, either resolve the conflicts, or close it to finish the backport process of #88860

@Felixoid

Copy link
Copy Markdown
Member

Amos already fixed it, so let's continue

@Felixoid Felixoid reopened this Dec 18, 2025
@Felixoid

Copy link
Copy Markdown
Member

Ah, sorry. 25.9 is already closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants