Skip to content

Conversation

@szehon-ho
Copy link
Member

@szehon-ho szehon-ho commented Jan 6, 2026

Fixes #5556

This is a first cut in implementing schema evolution for Spark MERGE INTO commands for Iceberg tables.

This was implemented in https://issues.apache.org/jira/browse/SPARK-54274 mostly in Spark 4.1.0. There are a few remaining features in Spark 4.1.1 that I can add test for, once we upgrade.

Unfortunately there are some issues with MERGE INTO WITH SCHEMA EVOLUTION if the target is a table branch.

@github-actions github-actions bot added the spark label Jan 6, 2026
@szehon-ho szehon-ho closed this Jan 6, 2026
@szehon-ho szehon-ho reopened this Jan 6, 2026
@szehon-ho
Copy link
Member Author

@amogh-jahagirdar @huaxingao can one of you help take a look?

@huaxingao
Copy link
Contributor

Thanks @szehon-ho for the PR! Can we add a TODO or open a tracking issue for the branch limitation? Otherwise, LGTM.

Copy link
Contributor

@singhpk234 singhpk234 left a comment

Choose a reason for hiding this comment

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

LGTM as well, thanks a ton for driving it in both spark and here @szehon-ho !

It would be really nice to have a disabled test with a note with the limitation we are aware of, which we expect to get fixed in 4.1.1 (which seems already in motion here #14946)

Copy link
Contributor

@dramaticlly dramaticlly left a comment

Choose a reason for hiding this comment

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

Thanks @szehon-ho ! I bet many would love to see this change in next release

@szehon-ho
Copy link
Member Author

Thanks all, I just checked offline with @amogh-jahagirdar, we dont support alter schema for branches today.

That's the failure, it tries to alter table on the branch and fails, so it seems expected, and no need to create an issue

@huaxingao huaxingao merged commit 99f14e7 into apache:main Jan 8, 2026
42 of 62 checks passed
@huaxingao
Copy link
Contributor

Thanks @szehon-ho for the PR! Thanks @singhpk234 @dramaticlly for the review!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support mergeSchema option when using Spark MERGE INTO

4 participants