rdblue commented on code in PR #16936:
URL: https://github.com/apache/iceberg/pull/16936#discussion_r4319390812
##########
core/src/test/java/org/apache/iceberg/TestTrackedFileAdapters.java:
##########
@@ -577,6 +640,271 @@ void unknownSpecIdThrows() {
.hasMessageContaining("Cannot find partition spec for spec ID");
}
+ @Test
+ void dataTrackedFileAdapterFromDataFile() {
+ TrackedFile result =
TrackedFileAdapters.forDataFile(TABLE_SCHEMA).wrap(DATA_FILE);
+
+ assertThat(result.tracking()).isNull();
+ assertWrappedDataFileMatchesFileFields(result, DATA_FILE);
+ }
+
+ @Test
+ void dataTrackedFileAdapterFromExistingManifestEntry() {
+ TrackedFile result =
+ TrackedFileAdapters.forDataFile(TABLE_SCHEMA)
+ .wrap(
+ newEntry()
Review Comment:
`newEntry` returns an entry that uses a partitioned schema, but `DATA_FILE`
uses the unpartitioned spec.
This is why in other test suites, I moved to using factory methods and
constants that state whether they have content stats and/or partitioning. We
should avoid mismatches here.
--
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]