yadavay-amzn commented on code in PR #15917: URL: https://github.com/apache/iceberg/pull/15917#discussion_r3133735387
########## 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: Good point — updated to note this precedence applies to Spark 4.1+. -- 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]
