Skip to content

feat: Block alter table when icebergCompatV3 enabled#2505

Open
dengsh12 wants to merge 6 commits intodelta-io:mainfrom
dengsh12:stack/block-alter-table
Open

feat: Block alter table when icebergCompatV3 enabled#2505
dengsh12 wants to merge 6 commits intodelta-io:mainfrom
dengsh12:stack/block-alter-table

Conversation

@dengsh12
Copy link
Copy Markdown
Collaborator

@dengsh12 dengsh12 commented Apr 30, 2026

🥞 Stacked PR

Use this link to review incremental changes.


What changes are proposed in this pull request?

Block alter table when icebergCompatV3 enabled. Alter table transactions are expected to build from AlterTableTransactionBuilder::build, thus we block that function on icebergCompatV3 tables.

How was this change tested?

Integration test: create an icebergCompatV3 table and validate the error.

Note: Successful paths have been covered by existing tests so we are not adding test for successful path here

@dengsh12 dengsh12 changed the title block alter table feat: Block alter table when icebergCompatV3 enabled Apr 30, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.50%. Comparing base (78670eb) to head (cd4bf3f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2505   +/-   ##
=======================================
  Coverage   88.50%   88.50%           
=======================================
  Files         179      179           
  Lines       59031    59036    +5     
  Branches    59031    59036    +5     
=======================================
+ Hits        52245    52250    +5     
  Misses       4785     4785           
  Partials     2001     2001           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added the breaking-change Public API change that could cause downstream compilation failures. Requires a major version bump. label Apr 30, 2026
committer: Box<dyn Committer>,
) -> DeltaResult<AlterTableTransaction> {
let table_config = self.snapshot.table_configuration();
// We don't support ALTER TABLE on tables with icebergCompatV3 enabled yet. See
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Note: We could put the validation on constructor of the AlterTableTransactionBuilder(i.e. add a try_new) and fail early. But that breaks all callers by a DeltaResult(currently constructor of AlterTableTransactionBuilder never fails). As this is a temporal limitation, feel like not need to break callers here

@dengsh12 dengsh12 force-pushed the stack/block-alter-table branch from 70b7fb4 to ffd8ecb Compare April 30, 2026 22:58
@dengsh12 dengsh12 force-pushed the stack/block-alter-table branch from ffd8ecb to cae1ea9 Compare April 30, 2026 23:28
@dengsh12 dengsh12 marked this pull request as ready for review April 30, 2026 23:31
@github-actions github-actions Bot removed the breaking-change Public API change that could cause downstream compilation failures. Requires a major version bump. label Apr 30, 2026
@dengsh12 dengsh12 marked this pull request as draft May 1, 2026 01:32
@dengsh12 dengsh12 changed the title feat: Block alter table when icebergCompatV3 enabled WIP: feat: Block alter table when icebergCompatV3 enabled May 1, 2026
@dengsh12 dengsh12 changed the title WIP: feat: Block alter table when icebergCompatV3 enabled feat: Block alter table when icebergCompatV3 enabled May 1, 2026
@dengsh12 dengsh12 marked this pull request as ready for review May 1, 2026 02:51
@dengsh12 dengsh12 force-pushed the stack/block-alter-table branch from d85955c to 3f1154c Compare May 1, 2026 02:59
Jameson-Crate pushed a commit to Jameson-Crate/delta-kernel-rs that referenced this pull request May 1, 2026
…#2475)

## 🥞 Stacked PR
Use this
[link](https://github.com/delta-io/delta-kernel-rs/pull/2475/files) to
review incremental changes.
-
[**stack/add-v3-feature**](delta-io#2475)
[[Files
changed](https://github.com/delta-io/delta-kernel-rs/pull/2475/files)]
  - stack/write-nested-id
-
[stack/write-part-when-ice3](delta-io#2504)
[[Files
changed](https://github.com/delta-io/delta-kernel-rs/pull/2504/files/e1a4b559271b72323a9b560aa456db49276b63e1..9f777f08559a7f0b7e014756182fbcb1ae788996)]
-
[stack/block-alter-table](delta-io#2505)
[[Files
changed](https://github.com/delta-io/delta-kernel-rs/pull/2505/files/9f777f08559a7f0b7e014756182fbcb1ae788996..ffd8ecb8ce71681530b92f3683977bd58b9d57b0)]

---------
## Stacked PR
Use this
[link](https://github.com/delta-io/delta-kernel-rs/pull/2475/files) to
review incremental changes.
-
[**stack/add-v3-feature**](delta-io#2475)
[[Files
changed](https://github.com/delta-io/delta-kernel-rs/pull/2475/files)]
  - stack/write-nested-id
-
[stack/write-part-when-ice3](delta-io#2504)
[[Files
changed](https://github.com/delta-io/delta-kernel-rs/pull/2504/files/e1a4b559271b72323a9b560aa456db49276b63e1..5442d0979cbe36fc2eb1e85bf0a79bc01c30e121)]

---------
## What changes are proposed in this pull request?

Add `icebergCompatV3` and it's `FeatureInfo`


## How was this change tested?
Tested happy/unhappy paths for `icebergCompatV3`:

1. Error when row tracking not enabled
2. Error when column mapping not enabled
3. Error when `icebergCompatV1/V2` enabled
4. `icebergCompatV3` enablement follows the corresponding table property
5. Write operation is blocked 
6. Success when all requirements are met
@dengsh12 dengsh12 force-pushed the stack/block-alter-table branch from 3f1154c to ff634da Compare May 1, 2026 21:07
// [`crate::table_features::ICEBERG_COMPAT_V3_INFO`] for the tracking issue.
if table_config.is_feature_enabled(&TableFeature::IcebergCompatV3) {
return Err(Error::unsupported(
"ALTER TABLE is not supported on tables with icebergCompatV3 enabled",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This error makes it seem like ALTER TABLE is fundamentally not supported on IcebergCompatV3 tables.

The reality is: ALTER TABLE is not yet supported on IcebergCompatV3 tables.

Please add yet there.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point! Clarified: added yet

Copy link
Copy Markdown
Collaborator

@scottsand-db scottsand-db left a comment

Choose a reason for hiding this comment

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

LGTM but please implement my feedback to clarify and improve the error message

@dengsh12 dengsh12 force-pushed the stack/block-alter-table branch from 562605f to cd4bf3f Compare May 2, 2026 01:00
CynicDog pushed a commit to CynicDog/delta-kernel-rs that referenced this pull request May 2, 2026
…lta-io#2504)

## Stacked PR
Use this
[link](https://github.com/delta-io/delta-kernel-rs/pull/2504/files) to
review incremental changes.
-
[stack/add-v3-feature](delta-io#2475)
[[Files
changed](https://github.com/delta-io/delta-kernel-rs/pull/2475/files)]
[MERGED]
-
[**stack/write-part-when-ice3**](delta-io#2504)
[[Files
changed](https://github.com/delta-io/delta-kernel-rs/pull/2504/files)]
-
[stack/block-alter-table](delta-io#2505)
[[Files
changed](https://github.com/delta-io/delta-kernel-rs/pull/2505/files/15d151f8b271a72cb421ccfa81cda7d5887d1b37..562605f3911acd99854efae7940deb9344e7ee55)]
-
[stack/write-nested-id](delta-io#2508)
[[Files
changed](https://github.com/delta-io/delta-kernel-rs/pull/2508/files/562605f3911acd99854efae7940deb9344e7ee55..766ace41c2176c546f533be4ff0d7a9aa24ae001)]

---------
## What changes are proposed in this pull request?
Materialize partition values when icebergCompatV3 enabled.

## How was this change tested?
1. When `icebergCompatV3` enabled, partition columns are contained into
`physical_write_schema`
2. When `icebergCompatV3` supported but not enabled, partition columns
are not contained into `physical_write_schema`

Note: other related cases(e.g. `MaterializePartitionColumns`) are
already covered by existing tests so we are not adding tests here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants