Fix crash during ALTER TABLE REMOVE SETTING in iceberg#99108
Fix crash during ALTER TABLE REMOVE SETTING in iceberg#99108
Conversation
There was a problem hiding this comment.
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_IMPLEMENTEDwhen column properties are removed viaMODIFY 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.
tests/queries/0_stateless/04033_iceberg_alter_remove_settings_segfault.sh
Show resolved
Hide resolved
src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp
Outdated
Show resolved
Hide resolved
tests/queries/0_stateless/04033_iceberg_alter_remove_settings_segfault.sh
Show resolved
Hide resolved
src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp
Outdated
Show resolved
Hide resolved
rebase to d15162f (lastest master),upgrade test will pass! |
There was a problem hiding this comment.
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.
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 88.89% (8/9) |
Cherry pick #99108 to 25.8: Fix crash during ALTER TABLE REMOVE SETTING in iceberg
Cherry pick #99108 to 25.12: Fix crash during ALTER TABLE REMOVE SETTING in iceberg
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix crash in
ALTER TABLE ... REMOVE SETTINGSquery for Iceberg table engine. Fixes #86330.Documentation entry for user-facing changes
This PR was created with help of Claude Code.
Note
Low Risk
Low risk: change is a narrow validation guard for Iceberg
ALTER TABLEplus a regression test, with no impact outside Iceberg DDL handling.Overview
Prevents a crash when running
ALTER TABLE ... MODIFY COLUMN ... REMOVE SETTINGSon Iceberg tables by explicitly rejecting anyMODIFY_COLUMNcommand that attempts to remove column properties (returnsNOT_IMPLEMENTED).Adds a stateless regression test that creates an
IcebergLocaltable, inserts a snapshot, runs the unsupported ALTER, and asserts theNOT_IMPLEMENTEDerror instead of a segfault.Written by Cursor Bugbot for commit 0924cd5. This will update automatically on new commits. Configure here.