amogh-jahagirdar commented on code in PR #14226:
URL: https://github.com/apache/iceberg/pull/14226#discussion_r2394727722


##########
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:
   +1, copy should preserve the referenced data file



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