anoopj commented on code in PR #16867:
URL: https://github.com/apache/iceberg/pull/16867#discussion_r3454218645
##########
core/src/main/java/org/apache/iceberg/TrackedFileAdapters.java:
##########
@@ -405,6 +418,137 @@ 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) {
Review Comment:
Make sense. Added the validation and a test.
##########
core/src/test/java/org/apache/iceberg/TestTrackedFileAdapters.java:
##########
@@ -289,6 +291,263 @@ void testDVDeleteFileAdapterRejectsNullDeletionVector() {
.hasMessage("Cannot create DV delete file: no deletion vector");
}
+ @Test
+ void testManifestFileAdapterDelegation() {
+ Tracking tracking = createTracking();
+ ManifestInfo manifestInfo = createManifestInfo();
+ TrackedFileStruct file =
+ new TrackedFileStruct(
+ tracking,
+ FileContent.DATA_MANIFEST,
+ WRITER_FORMAT_VERSION,
+ MANIFEST_FILE_LOCATION,
+ FileFormat.PARQUET,
+ NO_PARTITION,
+ 8L,
+ 2048L);
+ file.set(MANIFEST_INFO_ORDINAL, manifestInfo);
Review Comment:
Sounds good. I can make the change if
https://github.com/apache/iceberg/pull/16769 gets merged first or do this as a
followup PR if this gets merged first.
--
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]