Skip to content

Docs: Clarify Spark branch write precedence over WAP branch - #18409

Closed
kastoestoramadus wants to merge 2 commits into
apache:mainfrom
kastoestoramadus:oss/15916-clarify-spark-branch-write-precedence
Closed

kastoestoramadus wants to merge 2 commits into
apache:mainfrom
kastoestoramadus:oss/15916-clarify-spark-branch-write-precedence

Conversation

@kastoestoramadus

Copy link
Copy Markdown

Closes #15916

After #15288 the "Writing to Branches" section of docs/docs/spark-writes.md no longer matched SparkTableUtil.determineWriteBranch.

Before: the page said the target branch must always exist, and that a branch identifier and spark.wap.branch "cannot both be specified".

After:

  • Spark 4.1+: documents the branch write option (must match the identifier branch if both are set), and that an explicit branch wins over the session WAP branch, which is used only when none is set and WAP is enabled.
  • Spark 3.5 and 4.0: documents that an explicit branch combined with spark.wap.branch still fails validation.
  • A branch named in the table identifier must exist; the session WAP branch and the branch option (4.1+) may create it during the write.
  • The WAP note now states the real constraint: WAP ID and WAP branch cannot both be set.

Docs only, no test to write. cd site && make build (markdown lint + mkdocs build) passes.

Generated with deepseek-4.1-flash/h through Claude Code
Reviewed by sonnet-5.5/l

Branch resolution no longer matched SparkTableUtil after apache#15288: in Spark 4.1
and higher an explicit branch from the table identifier or the `branch` write
option takes priority over the session WAP branch, while Spark 3.5 and 4.0
reject an explicit branch combined with a WAP branch. Document the precedence,
the write option, and which branches may be created during a write.
@github-actions github-actions Bot added the docs label Oct 7, 2026
@kastoestoramadus
kastoestoramadus marked this pull request as ready for review October 7, 2026 10:34
… option

The WAP ID/branch exclusivity is validated when the WAP branch is actually
used, the branch write option requires the Iceberg extensions unless the
identifier names a branch, and on 3.5/4.0 spark.wap.branch is ignored on
tables without WAP enabled.
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.

Docs: Clarify Spark branch write precedence over WAP branch

1 participant