nastra commented on code in PR #14226:
URL: https://github.com/apache/iceberg/pull/14226#discussion_r2393562390


##########
core/src/main/java/org/apache/iceberg/RewriteTablePathUtil.java:
##########
@@ -449,12 +449,25 @@ private static RewriteResult<DeleteFile> 
writeDeleteFileEntry(
         String targetDeleteFilePath = newPath(file.location(), sourcePrefix, 
targetPrefix);
         Metrics metricsWithTargetPath =
             ContentFileUtil.replacePathBounds(file, sourcePrefix, 
targetPrefix);
-        DeleteFile movedFile =
+        FileMetadata.Builder builder =
             FileMetadata.deleteFileBuilder(spec)
                 .copy(file)
                 .withPath(targetDeleteFilePath)
-                .withMetrics(metricsWithTargetPath)
-                .build();
+                .withMetrics(metricsWithTargetPath);
+
+        // Preserve DV-specific fields for deletion vectors
+        if (file.referencedDataFile() != null) {

Review Comment:
   instead of doing this here a better approach would be to carry this over in 
the `copy()` method. See also https://github.com/apache/iceberg/issues/13671



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