amogh-jahagirdar commented on code in PR #15917:
URL: https://github.com/apache/iceberg/pull/15917#discussion_r3131897971


##########
docs/docs/spark-writes.md:
##########
@@ -229,7 +229,17 @@ 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.
+
+<!-- KEEP IN SYNC: SparkWriteBuilder.branchOption -->
+The target branch is resolved with the following precedence:
+
+- The identifier and option branches can't conflict. If both are set, they 
must match.
+- Identifier and option branches take priority over the session WAP branch.
+- If neither the option nor the identifier branch is set and WAP is enabled 
for the table,
+  the WAP branch from the session SQL config is used.
+

Review Comment:
   This looks right for Spark 4.1, but isn't the case for older versions. We 
should probably update the docs to make that distinction clear.



##########
docs/docs/spark-writes.md:
##########
@@ -229,7 +229,17 @@ 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.
+
+<!-- KEEP IN SYNC: SparkWriteBuilder.branchOption -->

Review Comment:
   Minor: I tend not to be a fan of comments like this because by itself it 
doesn't really make the author of the change keep it in sync. At which point, 
why have the comment? 



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

Reply via email to