Skip to content

Stable 25.8 Backport of #102156 - Fix Nullable(X)->Y cross-type ALTER MODIFY COLUMN - #2709

Merged
zvonand merged 2 commits into
stable-25.8from
backports/stable-25.8/102156
Oct 28, 2026
Merged

zvonand merged 2 commits into
stable-25.8from
backports/stable-25.8/102156

Conversation

@zvonand

@zvonand zvonand commented Oct 27, 2026

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix

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

Fixed ALTER MODIFY COLUMN failing when converting a Nullable column to a different type with a DEFAULT (e.g. Nullable(UInt8) → String,LowCardinality(String), or Array(UInt8)). (ClickHouse#102156 by @il9ue)

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)

Michicosun and others added 2 commits October 27, 2026 14:11
…pe-modify-upstream

Fix Nullable(X)->Y cross-type ALTER MODIFY COLUMN

Conflicts committed as-is; the next commit resolves them:
- src/Interpreters/inplaceBlockConversions.cpp (both modified)
Adapted the fix by using `std::make_shared` instead of `make_intrusive`; dropped test Case 9 because `Nullable(Tuple)` and `allow_experimental_nullable_tuple_type` don't exist in stable-25.8
@zvonand zvonand added 25.8 25.8 Altinity Stable backport Backport stable stable-25.8 labels Oct 27, 2026
@zvonand

zvonand commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

Backporter: cherry-pick conflicts resolved by AI

Conflicted files:

  • src/Interpreters/inplaceBlockConversions.cpp (both modified)

Commits:

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

  • 635a666: resolution

  • src/Interpreters/inplaceBlockConversions.cpp conflicted because upstream uses make_intrusive for AST nodes and stable-25.8 still uses std::make_shared. I kept the upstream logic in convertRequiredExpressions (ifNull(_CAST(col, 'Nullable(T)'), _CAST(default, 'T')) for targets that can be Nullable, and if(isNull(col), ...) for Array/Tuple/Map) and switched it to std::make_shared.

  • The bug (_CAST(ifNull(col, default), 'T')) is present in stable-25.8, so the fix applies there.

  • 03575_modify_column_null_to_default_cross_type.sql: removed Case 9. It sets allow_experimental_nullable_tuple_type, which doesn't exist in stable-25.8, and uses Nullable(Tuple(...)), which stable-25.8 rejects.

  • 03575_modify_column_null_to_default_cross_type.reference: removed Case 9's two output lines to match.

@github-actions

Copy link
Copy Markdown

Workflow [PR], commit [635a666]

@zvonand

zvonand commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

@blau-ai

@zvonand
zvonand merged commit e2878cb into stable-25.8 Oct 28, 2026
232 of 236 checks passed
@zvonand zvonand added the verified Approved for release label Oct 28, 2026
@blau-ai

blau-ai commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

CI triage for #2709 (head 635a666cb3)

Verdict: 2 failing checks, 0 caused by this PR. 1 is an infra/network flake and 1 is the DCO check, which fails on every stable-25.8 backport. The PR check is just the aggregate gate. No code changes are needed.

Check Failure Classification
Stateless tests (amd_asan, distributed plan, sequential) 02789_filesystem_cache_alignment ❌ Not PR-related: outbound network timeout to GitHub
DCO Missing Signed-off-by ❌ Not PR-related: process check, fails on sibling backports too

1. Stateless tests (amd_asan, distributed plan, sequential): 02789_filesystem_cache_alignment

Taken from the praktika report (Failed: 1, Passed: 653):

Code: 1000. DB::Exception: Timeout: connect timed out: 185.199.109.133:443. (POCO_EXCEPTION)
...
18. DB::WebObjectStorage::loadFiles(...)
19. DB::WebObjectStorage::tryGetFileInfo(...)
20. DB::MetadataStorageFromStaticFilesWebServer::existsFile(...)
21. DB::SystemRemoteDataPathsSource::nextFile()
  • The test's own checks produced the expected output (OK/0 lines in stdout). It failed only because the query on system.remote_data_paths walks every disk the server knows about. That includes the ad-hoc type = web disk that 03355_mergetree_table_disk.sql registers earlier in the same server lifetime (endpoint = 'https://raw.githubusercontent.com/ClickHouse/web-tables-demo/...'). The connect to GitHub's IP (185.199.109.133) timed out from the runner.
  • This PR only touches src/Interpreters/inplaceBlockConversions.cpp (the Nullable→non-Nullable DEFAULT conversion during ALTER MODIFY COLUMN). Neither the web object storage, the filesystem cache nor system.remote_data_paths is involved.
  • Next step: safe to re-run. If you want to harden this, 02789 could filter system.remote_data_paths by disk_name, so a leftover web disk from another test can't be reached. That would go in a separate PR, not this one.

2. DCO

Neither commit (bfa54d5038 upstream merge, 635a666cb3 conflict resolution) has a Signed-off-by: trailer. The same check fails on other stable-25.8 backports, e.g. #2694, so it's the usual non-blocking state for these PRs. Next step: ignore, or have a maintainer set DCO to pass, following the usual process for backports.


Health check of the PR's own change

  • The new test 03575_modify_column_null_to_default_cross_type passed Stateless tests (amd_asan, flaky check): 50/50 runs.
  • Every other stateless suite that ran is green: Fast test, debug/ubsan/asan parallel+sequential, old analyzer + DatabaseReplicated, ParallelReplicas, AsyncInsert, distributed plan s3.
  • tsan/msan/arm jobs were skipped on purpose by the CI options in the PR body (job reasons: job name includes excluded tag 'tsan'/'msan'/'arm'). So this PR has no TSAN/MSAN coverage. That's acceptable for a change limited to inplaceBlockConversions.cpp, but you should know it.
  • The conflict resolution (std::make_shared instead of make_intrusive, dropping the Nullable(Tuple) case 9 that 25.8 can't express) matches the 25.8 APIs, and every build that ran succeeded.

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

Labels

25.8 25.8 Altinity Stable backport Backport stable stable-25.8 verified Approved for release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants