fqaiser94 commented on code in PR #6513:
URL: https://github.com/apache/iceberg/pull/6513#discussion_r1130248048
##########
api/src/main/java/org/apache/iceberg/PendingUpdate.java:
##########
@@ -29,6 +31,24 @@
*/
public interface PendingUpdate<T> {
+ /**
+ * Accepts a predicate which will be used to validate whether it is safe to
commit the pending
+ * changes to the current version of the table at commit time.
+ *
+ * <p>For example, this method could be used to ensure the pending changes
are only committed if a
+ * given snapshot property is present in the current version of the table.
+ *
+ * <p>This method can be called multiple times to add multiple predicates if
necessary.
+ *
+ * @param test The predicate which will be used to validate whether it is
safe to commit the
+ * pending changes to the current version of the table at commit time.
Any attempts to modify
+ * the table passed to the predicate will throw an exception as this
table is read-only.
+ * @param failMessage The message that will be included in the {@link
ValidationException} that
+ * will be thrown if the test returns false.
+ */
+ @FormatMethod
+ void validateCurrentTable(Predicate<Table> test, String failMessage);
Review Comment:
🤦 Fixed.
--
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]