Skip to content

Spark 4.1: Align handling of branches in reads and writes - #15288

Merged
aokolnychyi merged 4 commits into
apache:mainfrom
aokolnychyi:spark-branching-update
Feb 17, 2026
Merged

aokolnychyi merged 4 commits into
apache:mainfrom
aokolnychyi:spark-branching-update

Conversation

@aokolnychyi

@aokolnychyi aokolnychyi commented Feb 10, 2026 •

Copy link
Copy Markdown
Contributor

This PR aligns handling of branches in reads and writes.

After this PR, we will allow writes that explicitly provide the branch to succeed even if WAP is configured. Just like we allow this for reads. If the user configures a branch via identifier or in option, it must override everything else. The only remaining difference is that writes are allowed to create new branches.

@github-actions github-actions Bot added the spark label Feb 10, 2026
}

public String branch() {
String optionBranch = confParser.stringConf().option(SparkReadOptions.BRANCH).parseOptional();

@aokolnychyi aokolnychyi Feb 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved into a utility call. I will remove this method in subsequent PRs and use the utility directly.

}

public String branch() {
if (wapEnabled()) {

@aokolnychyi aokolnychyi Feb 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved into a utility call. I will remove this method in subsequent PRs.
We will have to resolve branches earlier.

@aokolnychyi

aokolnychyi commented Feb 10, 2026 •

Copy link
Copy Markdown
Contributor Author

This PR includes a behavior change from #15240 to simplify the main PR and review.

cc @amogh-jahagirdar @nastra @szehon-ho @huaxingao @singhpk234

@amogh-jahagirdar
amogh-jahagirdar self-requested a review February 16, 2026 23:45
@aokolnychyi

Copy link
Copy Markdown
Contributor Author

@amogh-jahagirdar @nastra @szehon-ho @huaxingao @singhpk234, could you check this one? It is the last one before I can rebase the main PR with versioned Spark tables support.

@amogh-jahagirdar amogh-jahagirdar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @aokolnychyi , this looks right to me!

@aokolnychyi
aokolnychyi merged commit c7ed71e into apache:main Feb 17, 2026
22 checks passed
@aokolnychyi

Copy link
Copy Markdown
Contributor Author

Thanks, @amogh-jahagirdar!

RjLi13 pushed a commit to RjLi13/iceberg that referenced this pull request Mar 12, 2026
talatuyarer pushed a commit to talatuyarer/iceberg that referenced this pull request Apr 1, 2026
yadavay-amzn added a commit to yadavay-amzn/iceberg that referenced this pull request Apr 9, 2026
After apache#15288, the identifier and option branches take priority over the
session WAP branch. The docs previously stated that WAP branch and branch
identifier cannot both be specified, which is no longer accurate.

Also updated the note about branch creation during writes.
yadavay-amzn added a commit to yadavay-amzn/iceberg that referenced this pull request Apr 23, 2026
After apache#15288, the identifier and option branches take priority over the
session WAP branch. The docs previously stated that WAP branch and branch
identifier cannot both be specified, which is no longer accurate.

Also updated the note about branch creation during writes.
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.

2 participants