RussellSpitzer commented on code in PR #13922:
URL: https://github.com/apache/iceberg/pull/13922#discussion_r2317110363


##########
core/src/main/java/org/apache/iceberg/util/WapUtil.java:
##########
@@ -39,6 +41,33 @@ public static String publishedWapId(Snapshot snapshot) {
         : null;
   }
 
+  /**
+   * Sets Write-Audit-Publish (WAP) properties on the given {@link 
SnapshotUpdate} operation. This
+   * method is intended to be used by write operations that support WAP, 
ensuring that staged
+   * snapshot is tagged with wapId and wap branches are tag with branch name
+   *
+   * @param operation the {@link SnapshotUpdate} operation to update with WAP 
properties
+   * @param wapEnabled true if WAP is enabled for this operation
+   * @param wapId the WAP ID for staging the commit, or null if not applicable
+   * @param branch the branch name for WAP commit, or null if not applicable
+   * @param isWapBranch a predicate to determine if a branch is a WAP branch
+   */
+  public static void setWapProperties(
+      SnapshotUpdate<?> operation,
+      boolean wapEnabled,
+      String wapId,
+      String branch,
+      Predicate<String> isWapBranch) {

Review Comment:
   Hmmm let's try to think of an alternative here?  Maybe we just only pass 
through "branch" if it is a Wap branch?
   
   So have wapId and wapBranch as parameters
   



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to