stevenzwu commented on code in PR #16867:
URL: https://github.com/apache/iceberg/pull/16867#discussion_r3508391527


##########
core/src/main/java/org/apache/iceberg/TrackedFileAdapters.java:
##########
@@ -405,6 +417,121 @@ public DeleteFile copyWithStats(Set<Integer> 
requestedColumnIds) {
     }
   }
 
+  /**
+   * Adapts a TrackedFile DATA_MANIFEST or DELETE_MANIFEST entry to the {@link 
ManifestFile}
+   * interface.
+   */
+  private static class TrackedManifestFile implements ManifestFile {
+    private final TrackedFile file;
+
+    private TrackedManifestFile(TrackedFile file) {
+      Preconditions.checkArgument(
+          file.tracking().dataSequenceNumber() != null, "Invalid data sequence 
number: null");
+      Preconditions.checkArgument(
+          file.tracking().snapshotId() != null, "Invalid snapshot ID: null");
+      Preconditions.checkArgument(
+          file.manifestInfo().dv() == null,
+          "Cannot adapt manifest with a deletion vector to ManifestFile: %s",

Review Comment:
   In the write path, I also proposed new additions to the `ManifestFile` 
interface. I added 3 new methods in my next PR #16936 . We can add more 
(including manifest DV) as we go.



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

Reply via email to