rdblue commented on code in PR #19105:
URL: https://github.com/apache/iceberg/pull/19105#discussion_r4672779368


##########
core/src/test/java/org/apache/iceberg/TestAppend.java:
##########
@@ -230,6 +231,38 @@ public void appendToUpgradedTable() throws IOException {
         statuses(EntryStatus.ADDED, EntryStatus.EXISTING));
   }
 
+  @ParameterizedTest
+  @ValueSource(ints = {1, 2})
+  void appendToTableUpgradedFromPreV3(int formatVersion) throws IOException {
+    Table table = create("upgraded_table", SCHEMA, SPEC, formatVersion);
+    table.newAppend().appendFile(FILE_A).commit();
+    long preV3SnapshotId = table.currentSnapshot().snapshotId();
+    ManifestFile preV3Manifest = 
table.currentSnapshot().allManifests(io).get(0);
+    assertThat(preV3Manifest.firstRowId()).isNull();
+
+    InMemoryTables.Table upgraded = upgrade("upgraded_table", 4);
+    long firstRowId = upgraded.ops().current().nextRowId();
+    upgraded.newAppend().appendFile(FILE_B).commit();

Review Comment:
   I think there should be a newline above this point because it is modifying 
the table here. It's easier to read if modifications are separate.



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