8000 Antalya 25.8 Backport of #94615 - Fix default expression evaluation when referencing other columns with defaults by zvonand · Pull Request #2797 · Altinity/ClickHouse · GitHub
[go: up one dir, main page]

Skip to content

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

Open
zvonand wants to merge 2 commits into
antalya-25.8from
backports/antalya-25.8/94615
Open

zvonand wants to merge 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]

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0