Skip to content

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

Open
aokolnychyi wants to merge 4 commits intoapache:mainfrom
aokolnychyi:spark-branching-update
Open

Spark 4.1: Align handling of branches in reads and writes#15288
aokolnychyi wants to merge 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

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.

1 participant