uros-b commented on code in PR #17660:
URL: https://github.com/apache/iceberg/pull/17660#discussion_r3801644216
##########
docs/docs/spark-writes.md:
##########
@@ -229,7 +229,10 @@ A branch can be created using [Spark
DDL](spark-ddl.md#branching-and-tagging-ddl
Branch writes can be performed by providing a branch identifier,
`branch_yourBranch` in the operation.
Branch writes can also be performed as part of a write-audit-publish (WAP)
workflow by specifying the `spark.wap.branch` config.
-Note WAP branch and branch identifier cannot both be specified.
+If a branch is specified in both the table identifier and a write option, the
values must match.
+An explicit branch from the table identifier or write option takes precedence
over the session WAP branch.
+If neither is specified, the session WAP branch is used when configured.
+The WAP branch and an explicit branch cannot be used together.
Review Comment:
The last sentence seems factually wrong for Spark 4.1 behavior and
internally contradicts the second added sentence ("takes precedence"). In Spark
4.1, SparkTableUtil.determineWriteBranch() falls through to return branch when
an explicit branch is set, silently ignoring the WAP session branch, no error
is thrown. The error semantics ("cannot be used together" /
ValidationException) belong to Spark 3.5 and 4.0, which use the old
SparkWriteConf.branch() path that throws "Cannot write to both branch and WAP
branch".
Since this doc page is the nightly (v4.1) reference, the fourth sentence
mis-states the behavior: it implies a hard conflict where the actual behavior
is "explicit branch silently wins". The sentence should be removed (the second
sentence already states the precedence) or rewritten as "If a WAP branch is
also set in the session, it is ignored when an explicit branch is provided."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]