amogh-jahagirdar commented on code in PR #18725:
URL: https://github.com/apache/iceberg/pull/18725#discussion_r4432802897
##########
core/src/test/java/org/apache/iceberg/TestFilePlanner.java:
##########
@@ -464,6 +464,42 @@ void leafFilesOpenedLazily(FileFormat format) throws
IOException {
}
}
+ @ParameterizedTest
+ @FieldSource("MANIFEST_FORMATS")
+ void leafReportingNoLiveFilesIsPruned(FileFormat format) throws IOException {
+ ManifestFile liveLeaf =
+ writeManifest(format, EMPTY_PARTITION,
ImmutableList.of(unpartitionedDataFile(FILE_A)));
+ String deadLeafLocation =
+ "s3://bucket/db/table/dead-leaf." +
format.name().toLowerCase(Locale.ROOT);
+ TrackedFile deadLeafRef =
+ manifestRef(
+ FileContent.DATA_MANIFEST,
+ deadLeafLocation,
+ manifestInfo(0, 0, 0, 2, FORMAT_VERSION_V4));
Review Comment:
`manifestInfo(0, 0, 0, 2, FORMAT_VERSION_V4)` is kind of hard to read
without checking the helper that `2` is deleted. Could we use small named
factories like the existing `dataManifestInfo(addedFiles)`, e.g.
`deletedOnly(...)`, `existingOnly(...)`, `modifiedOnly(...)`? That would also
make the per-status cases read clearly at the call site.
--
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]