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


##########
core/src/test/java/org/apache/iceberg/TestV4ManifestWriter.java:
##########
@@ -546,6 +620,379 @@ public void rootDataFileFirstRowIdAssignment() throws 
IOException {
     }
   }
 
+  @Test
+  public void rootManifestFileAppend() throws IOException {
+    OutputFile output = new InMemoryOutputFile("manifest.parquet");
+    V4ManifestWriter writer =
+        V4ManifestWriter.createRoot(
+            EncryptionUtil.plainAsEncryptedOutput(output),
+            Map.of(),
+            STATS_TYPE,
+            Map.of(),
+            SCHEMA.schemaId(),
+            COMMIT_SNAPSHOT_ID,
+            COMMIT_SEQUENCE_NUMBER,
+            COMMIT_FIRST_ROW_ID);
+    try (writer) {
+      writer.append(LEAF_MANIFEST);

Review Comment:
   This is on purpose. The tests are validating that even if there is tracking 
information, it is ignored.
   
   This could happen, for example, when moving files between branches or 
copying a manifest. A caller might get data files from a manifest and then try 
to commit them without trying to remove the original tracking metadata. That's 
why these tests start with an existing tracking, even for append cases.



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