You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "dramaticlly (via GitHub)" <gi...@apache.org> on 2026/10/19 18:24:43 UTC

Re: [PR] API, Core: Unify OverwriteFiles row filter and conflict detection filter [iceberg]

dramaticlly commented on code in PR #18546:
URL: https://github.com/apache/iceberg/pull/18546#discussion_r4317235798


##########
core/src/main/java/org/apache/iceberg/BaseOverwriteFiles.java:
##########
@@ -87,6 +96,8 @@ public OverwriteFiles deleteFiles(
 
   @Override
   public OverwriteFiles deleteFile(DataFile file) {
+    Preconditions.checkState(
+        !rowFilterSet, "Cannot delete data files explicitly when overwriting by row filter");

Review Comment:
   I think we are disallowing delete by file reference and delete by row filter here, but it seems like a legit use case before in https://github.com/apache/iceberg/pull/3199#discussion_r718940797. Can you share a bit more on the motivation?



##########
api/src/main/java/org/apache/iceberg/OverwriteFiles.java:
##########
@@ -55,6 +55,10 @@ public interface OverwriteFiles extends SnapshotUpdate<OverwriteFiles> {
    * <p>Files that may contain some rows that match the expression and some rows that do not will
    * result in a {@link ValidationException}.
    *
+   * <p>This cannot be combined with {@link #deleteFile(DataFile)} or {@link
+   * #conflictDetectionFilter(Expression)}; the row filter is used as the conflict detection filter
+   * for validation.
+   *

Review Comment:
   nit: how about add to throws section below?
   
   ```
      * @throws IllegalStateException If data files were deleted explicitly or a conflict detection
      *     filter was set
   ```



-- 
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-unsubscribe@iceberg.apache.org

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


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