Skip to content

Fix crash during ALTER TABLE REMOVE SETTING in iceberg#99108

Merged
alesapin merged 3 commits intomasterfrom
fix_iceberg_alter_settings
Mar 11, 2026
Merged

Fix crash during ALTER TABLE REMOVE SETTING in iceberg#99108
alesapin merged 3 commits intomasterfrom
fix_iceberg_alter_settings

Conversation

@alesapin
Copy link
Member

@alesapin alesapin commented Mar 9, 2026

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC)

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

Fix crash in ALTER TABLE ... REMOVE SETTINGS query for Iceberg table engine. Fixes #86330.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

This PR was created with help of Claude Code.


Note

Low Risk
Low risk: change is a narrow validation guard for Iceberg ALTER TABLE plus a regression test, with no impact outside Iceberg DDL handling.

Overview
Prevents a crash when running ALTER TABLE ... MODIFY COLUMN ... REMOVE SETTINGS on Iceberg tables by explicitly rejecting any MODIFY_COLUMN command that attempts to remove column properties (returns NOT_IMPLEMENTED).

Adds a stateless regression test that creates an IcebergLocal table, inserts a snapshot, runs the unsupported ALTER, and asserts the NOT_IMPLEMENTED error instead of a segfault.

Written by Cursor Bugbot for commit 0924cd5. This will update automatically on new commits. Configure here.

@clickhouse-gh
Copy link
Contributor

clickhouse-gh bot commented Mar 9, 2026

Workflow [PR], commit [0924cd5]

Summary:

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a crash triggered by ALTER TABLE ... MODIFY COLUMN ... REMOVE SETTINGS on Iceberg by explicitly rejecting unsupported “remove column properties” alters and adding a stateless regression test to assert NOT_IMPLEMENTED is returned instead of crashing.

Changes:

  • Add a guard in Iceberg ALTER validation to throw NOT_IMPLEMENTED when column properties are removed via MODIFY COLUMN.
  • Add a stateless bash test reproducing the original segfault scenario.
  • Add a reference output asserting NOT_IMPLEMENTED.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/queries/0_stateless/04033_iceberg_alter_remove_settings_segfault.sh Adds regression coverage for the crashing ALTER by asserting NOT_IMPLEMENTED.
tests/queries/0_stateless/04033_iceberg_alter_remove_settings_segfault.reference Expected output for the new regression test.
src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp Adds validation to reject unsupported column property removals instead of crashing.

You can also share your feedback on Copilot code review. Take the survey.

@ClickHouse ClickHouse deleted a comment from Copilot AI Mar 10, 2026
@tiandiwonder
Copy link
Contributor

Workflow [PR], commit [d3e4b12]

Summary:

job_name test_name status info comment
Upgrade check (amd_release) failure
Error message in clickhouse-server.log (see upgrade_error_messages.txt) FAIL cidb

rebase to d15162f (lastest master),upgrade test will pass!

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@clickhouse-gh
Copy link
Contributor

clickhouse-gh bot commented Mar 10, 2026

LLVM Coverage Report

Metric Baseline Current Δ
Lines 83.80% 83.80% +0.00%
Functions 23.90% 23.90% +0.00%
Branches 76.30% 76.30% +0.00%

PR changed lines: PR changed-lines coverage: 88.89% (8/9)
Diff coverage report
Uncovered code

@alesapin alesapin requested a review from tiandiwonder March 10, 2026 20:45
@alesapin alesapin added this pull request to the merge queue Mar 11, 2026
Merged via the queue into master with commit 7425d2a Mar 11, 2026
163 checks passed
@alesapin alesapin deleted the fix_iceberg_alter_settings branch March 11, 2026 11:04
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 11, 2026
@Algunenano Algunenano added pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-critical-bugfix labels Mar 13, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Mar 13, 2026
robot-clickhouse-ci-1 added a commit that referenced this pull request Mar 13, 2026
Cherry pick #99108 to 25.8: Fix crash during ALTER TABLE REMOVE SETTING in iceberg
robot-clickhouse-ci-1 added a commit that referenced this pull request Mar 13, 2026
Cherry pick #99108 to 25.12: Fix crash during ALTER TABLE REMOVE SETTING in iceberg
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
robot-clickhouse added a commit that referenced this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove settings from Iceberg table column SEGV

7 participants