You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "szehon-ho (via GitHub)" <gi...@apache.org> on 2023/05/02 21:59:55 UTC

[GitHub] [iceberg] szehon-ho commented on a diff in pull request #7501: API, Core: Make RewriteFiles flexible

szehon-ho commented on code in PR #7501:
URL: https://github.com/apache/iceberg/pull/7501#discussion_r1183088043


##########
api/src/main/java/org/apache/iceberg/RewriteFiles.java:
##########
@@ -34,13 +34,72 @@
  * will throw a {@link ValidationException}.
  */
 public interface RewriteFiles extends SnapshotUpdate<RewriteFiles> {
+  /**
+   * Delete a data file whose content was rewritten.
+   *
+   * @param dataFile a rewritten data file
+   * @return this for method chaining
+   */
+  default RewriteFiles deleteFile(DataFile dataFile) {
+    throw new UnsupportedOperationException(
+        this.getClass().getName() + " does not implement deleteFile");
+  }
+
+  /**
+   * Delete a delete file whose content was rewritten.

Review Comment:
   Question: will this be not entirely accurate for RewritePositionDelete?  We may end up not rewriting invalid deletes.  Or is 'rewritten' more nuanced?



-- 
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