dramaticlly commented on code in PR #13720:
URL: https://github.com/apache/iceberg/pull/13720#discussion_r2286653014


##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java:
##########
@@ -1209,6 +1213,191 @@ public void testNestedDirectoryStructurePreservation() 
throws Exception {
     assertThat(targetPath2).startsWith(targetTableLocation());
   }
 
+  @Test
+  public void testFullRewriteUpdatesAllManifestLengthsInManifestList(
+      @TempDir Path rootTargetLocation) throws Exception {
+    String location = newTableLocation();
+    Table sourceTable = createTableWithSnapshots(location, 10);
+
+    addAnyPositionDelete(
+        sourceTable, removePrefix(sourceTable.location() + 
"/data/deeply/nested/deletes.parquet"));
+
+    Map<String, Long> manifestSizesBeforeRewrite =
+        sourceTable.currentSnapshot().allManifests(sourceTable.io()).stream()
+            .collect(Collectors.toMap(m -> fileName(m.path()), m -> 
m.length()));
+
+    // Rewrite table metadata to a location that's much longer than the 
original in order
+    // to make manifests larger
+    String targetLocation = toAbsolute(rootTargetLocation) + 
generateLongNestedPath(25);

Review Comment:
   I tried with longer targetTableLocation for all tests and they seem to be 
happy 😉  But I am fine with `longTargetTableLocation`



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