RussellSpitzer commented on code in PR #12672:
URL: https://github.com/apache/iceberg/pull/12672#discussion_r2037914667
##########
core/src/test/java/org/apache/iceberg/TestManifestWriterVersions.java:
##########
@@ -213,27 +224,125 @@ public void testV2ManifestRewriteWithInheritance()
throws IOException {
checkRewrittenEntry(readManifest(manifest2), 0L, FileContent.DATA);
}
+ @Test
+ public void testV3Write() throws IOException {
+ ManifestFile manifest = writeManifest(3);
+ checkEntry(
+ readManifest(manifest),
+ ManifestWriter.UNASSIGNED_SEQ,
+ ManifestWriter.UNASSIGNED_SEQ,
+ FileContent.DATA,
+ FIRST_ROW_ID);
+ }
+
+ @Test
+ public void testV3WriteWithInheritance() throws IOException {
+ DataFile withoutFirstRowId =
+ DataFiles.builder(SPEC).copy(DATA_FILE).withFirstRowId(null).build();
+
+ ManifestFile manifest = writeAndReadManifestList(writeManifest(3,
withoutFirstRowId), 3);
+ checkManifest(manifest, SEQUENCE_NUMBER);
+ assertThat(manifest.content()).isEqualTo(ManifestContent.DATA);
+
+ // v2+ should use the correct sequence number by inheriting it
Review Comment:
Ah got it!
--
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]