Skip to content

Antalya 25.8 Backport of #94615 - Fix default expression evaluation when referencing other columns with defaults - #2797

Merged
zvonand merged 2 commits into
antalya-25.8from
backports/antalya-25.8/94615
Nov 10, 2026
Merged

zvonand merged 2 commits into
antalya-25.8from
backports/antalya-25.8/94615

Conversation

@zvonand

@zvonand zvonand commented Nov 5, 2026

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Fix default expression evaluation when referencing other columns with computed defaults. (ClickHouse#94615 by @alexey-milovidov)

Documentation entry for user-facing changes

...

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

alexey-milovidov and others added 2 commits November 4, 2026 16:40
…ssion-dependency-evaluation

Fix default expression evaluation when referencing other columns with defaults

Conflicts committed as-is; the next commit resolves them:
- src/Processors/Transforms/AddingDefaultsTransform.cpp (both modified)
Took upstream's dependency-ordered evaluation of default expressions, using antalya-25.8's `recursiveRemoveSparse` instead of `removeSpecialRepresentations`, which does not exist on this branch.
@zvonand

zvonand commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Backporter: cherry-pick conflicts resolved by AI

Conflicted files:

  • src/Processors/Transforms/AddingDefaultsTransform.cpp (both modified)

Commits:

  • b71ebe6: cherry-pick with the conflicts committed as-is

  • e3fbb42: resolution

  • Conflict: in src/Processors/Transforms/AddingDefaultsTransform.cpp, AddingDefaultsTransform::transform conflicted. The PR rewrites the single-pass default evaluation as a dependency-ordered loop, and antalya-25.8's old body differs from upstream's in two small ways.

  • What differs on antalya-25.8: it calls recursiveRemoveSparse where upstream later uses removeSpecialRepresentations, and it writes ColumnUInt8::create(1, 0) without the static_cast.

  • Resolution: I took the PR's version of the function in full: the dependency graph built with RequiredSourceColumnsVisitor, the ordered loop with its circular-dependency fallback, and the mixing step after each round. The only change is calling recursiveRemoveSparse instead of removeSpecialRepresentations.

  • Tests: the test reference changes (01060_defaults_all_columns.reference updated to test2, and the duplicate copy under tests/queries/bugs/ deleted) applied cleanly and are kept.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Workflow [PR], commit [e3fbb42]

@zvonand

zvonand commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

@blau-ai

@blau-ai

blau-ai commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

CI triage for e3fbb42

Verdict: 3 red checks, none caused by this PR. One is a race in an unrelated test, one is a runner that died, and one is the DCO check that backports always fail. The aggregate PR check is red only because of these.

Check Classification PR-caused?
Stateless tests (amd_debug, distributed plan, s3 storage, sequential): 03572_export_replicated_merge_tree_part_to_object_storage Race in the test itself (async export) No
Stateless tests (amd_binary, old analyzer, s3 storage, DatabaseReplicated, sequential) Infra: runner died, no result No
DCO Missing Signed-off-by on the cherry-picked upstream merge commit No (not a code issue)

The PR's own coverage is green. That includes Stateless tests (amd_asan, flaky check), which re-runs the changed test 01060_defaults_all_columns many times. All other stateless suites that ran also passed: amd_debug, asan, ubsan, AsyncInsert, ParallelReplicas, DatabaseReplicated parallel, and distributed plan parallel.


1. 03572_export_replicated_merge_tree_part_to_object_storage: flaky test, unrelated

 ---- Both data parts should appear
 1	2020
 2	2020
 3	2020
-4	2021
 ---- Export the same part again, it should be idempotent
 ...
 4	2021
  • ALTER TABLE ... EXPORT PART runs asynchronously. This test exports parts 2020_0_0_0 and 2021_0_0_0 and then runs SELECT * FROM s3_table right away, with no wait. In this run the 2021 export hadn't finished when the first SELECT ran. It had landed by the second SELECT (row 4 2021 is there), so the export works and the test just checks too early.
  • The sibling test 03572_export_merge_tree_part_to_object_storage.sh already puts sleep 3 after each export for this reason. The replicated variant has no wait at all.
  • It has nothing to do with this PR. The PR only changes AddingDefaultsTransform (the code that fills in DEFAULT values on insert), and this test has no DEFAULT columns. It passed in the parallel sibling job on the same binary.
  • Next step: safe to re-run. A separate PR to antalya-25.8 could make the test robust by polling system.exports (or the S3 table) until both parts are visible, or at least adding the same sleep the sibling test uses.

2. DatabaseReplicated, sequential: runner died

  • praktika says: Job failed to produce Result due to a script error or CI runner issue, and the job has no .results and no links.
  • In the GitHub job 127310137106, every setup step succeeded, but the Run step has conclusion null and the log is unavailable. This is the usual sign of a lost Hetzner runner, not a test failure.
  • I could not see any test names for this suite, so I'm not claiming it is clean. It just never ran to completion. The parallel half of the same configuration passed.
  • Next step: re-run this job.

3. DCO

  • The branch has the upstream merge commit b71ebe628d (author alexey-milovidov, no Signed-off-by), followed by the conflict-resolution commit e3fbb420dd. DCO fails on the upstream commit, as it does on every backport that keeps upstream history.
  • Next step: no code change needed. Override DCO as usual for backports.

Note on the backport itself

The conflict resolution looks right. It keeps upstream's dependency-ordered (topological) evaluation of defaults and uses recursiveRemoveSparse, because removeSpecialRepresentations doesn't exist on 25.8. The reference file moves from tests/queries/bugs/ into 0_stateless/ (2 test2), matching upstream. No changes are needed on this PR.

@zvonand zvonand added the verified Approved for release label Nov 10, 2026
@zvonand
zvonand merged commit 939aebe into antalya-25.8 Nov 10, 2026
240 of 245 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants