rdblue commented on a change in pull request #1469:
URL: https://github.com/apache/iceberg/pull/1469#discussion_r499732983
##########
File path: api/src/main/java/org/apache/iceberg/OverwriteFiles.java
##########
@@ -87,6 +87,36 @@
*/
OverwriteFiles validateAddedFilesMatchOverwriteFilter();
+ /**
+ * Set the snapshot ID used in any reads for this operation.
+ * <p>
+ * Validations will check changes after this snapshot ID.
+ *
+ * @param snapshotId a snapshot ID
+ * @return this for method chaining
+ */
+ OverwriteFiles validateFromSnapshot(long snapshotId);
+
+ /**
+ * Enables validation that files added concurrently do not conflict with
this commit's operation.
+ * <p>
+ * This method should be called when the table is queried to determine which
files to delete/append.
+ * If a concurrent operation commits a new file after the data was read and
that file might
+ * contain rows matching the specified conflict detection filter, the
overwrite operation
+ * will detect this during retries and fail.
+ * <p>
+ * Calling this method with a correct conflict detection filter is required
to maintain
+ * serializable isolation for eager update/delete operations. Otherwise, the
isolation level
+ * will be snapshot isolation.
+ * <p>
+ * Validation applies to files added to the table since the snapshot passed
to {@link #validateFromSnapshot(long)}.
+ *
+ * @param conflictDetectionFilter an expression on rows in the table
+ * @param isCaseSensitive whether conflict detection filter evaluation
should be case sensitive
+ * @return this for method chaining
+ */
+ OverwriteFiles validateNoConflictingAppends(Expression
conflictDetectionFilter, boolean isCaseSensitive);
Review comment:
Good catch. I think we should have a `caseSensitive(boolean)` method
that is called separately. That should be configured once per operation, not
for each validation option.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]