Skip to content

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

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

Spark 4.1: Align handling of branches in reads and writes#15288
aokolnychyi merged 4 commits intoapache:mainfrom
aokolnychyi:spark-branching-update

Conversation

@aokolnychyi
Copy link
Contributor

@aokolnychyi aokolnychyi commented Feb 10, 2026

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();
Copy link
Contributor Author

@aokolnychyi aokolnychyi Feb 10, 2026

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()) {
Copy link
Contributor Author

@aokolnychyi aokolnychyi Feb 10, 2026

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
Copy link
Contributor Author

aokolnychyi commented Feb 10, 2026

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
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.

Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

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
Contributor Author

Thanks, @amogh-jahagirdar!

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

Comments