Skip to content

Backport #115371 to 26.8: Warn when CLEAR COLUMN leaves an EPHEMERAL-derived MATERIALIZED column stale, and cover it with a test - #123721

Merged
clickhouse-gh[bot] merged 3 commits into
26.8from
backport/26.8/115371
Oct 5, 2026
Merged

clickhouse-gh[bot] merged 3 commits into
26.8from
backport/26.8/115371

Conversation

@robot-ch-test-poll

@robot-ch-test-poll robot-ch-test-poll commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #115371
Cherry-pick pull-request #122428

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.8.18.2

…derived MATERIALIZED column stale, and cover it with a test
@robot-ch-test-poll robot-ch-test-poll added the pr-backport Changes, backported to release branch. Do not use manually - automated use only! label Oct 3, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [29c7993]

Summary: ✅

alexey-milovidov and others added 2 commits October 5, 2026 06:40
… recompute on 26.8

On master the `CLEAR COLUMN` recompute set was narrowed to the dependency closure of the cleared
columns by an unrelated feature, which is what keeps `MATERIALIZED` columns reading an `EPHEMERAL`
column out of it. 26.8 still recomputes every `MATERIALIZED` column, so the backported tests
`05055_clear_column_ephemeral_materialized` and `05153_clear_column_stale_materialized_warning`
failed with `NO_SUCH_COLUMN_IN_TABLE` / `UNKNOWN_IDENTIFIER` for the `EPHEMERAL` column.

Keep the broad 26.8 recompute set and only leave out the columns that read an `EPHEMERAL` column,
both from `clear_affected_materialized` and from the per-command dependency check, which analyzed
their expressions without the `EPHEMERAL` columns and threw.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=123721&sha=latest&name_0=BackportPR
PR: #123721

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The two backported tests (05055_clear_column_ephemeral_materialized, 05153_clear_column_stale_materialized_warning) failed on 26.8. On master, a separate change narrowed the CLEAR COLUMN recompute set to the dependency closure of the cleared columns, and that is what keeps EPHEMERAL-derived MATERIALIZED columns out of the recompute. That change is not in 26.8. I added a 26.8-only adaptation in cb42a90: it keeps 26.8's broad recompute set and skips only the MATERIALIZED columns that read an EPHEMERAL column, both in clear_affected_materialized and in the per-command CLEAR COLUMN dependency check. Both new tests pass locally, along with 04546_ttl_delete_where_recalc_after_update, 04648_mutation_statistics_type_mismatch and the existing CLEAR COLUMN and ephemeral tests. I also merged the latest 26.8.

@clickhouse-gh
clickhouse-gh Bot merged commit 9f84259 into 26.8 Oct 5, 2026
41 of 42 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.8/115371 branch October 5, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants