RussellSpitzer commented on code in PR #13922:
URL: https://github.com/apache/iceberg/pull/13922#discussion_r2316740635
##########
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:
Why do we need a functional interface here?
--
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]