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


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RemoveDanglingDeletesSparkAction.java:
##########
@@ -156,7 +162,12 @@ private List<DeleteFile> findDanglingDeletes() {
             .or(
                 col("data_file.content")
                     .equalTo("2")
-                    
.and(col("sequence_number").$less$eq(col("min_data_sequence_number"))));
+                    
.and(col("sequence_number").$less$eq(col("min_data_sequence_number"))))
+            // dvs pointing to non-existing data files
+            .or(
+                col("data_file.file_format")
+                    .equalTo(FileFormat.PUFFIN.name())

Review Comment:
   I'm not sure this is actually an issue. Throughout the codebase the 
`DeleteFile#referencedDataFile()` is always referring to a DataFile's location, 
such as here: 
https://github.com/apache/iceberg/blob/5bd314bdf6c3b5e0e5346d0f7408353bdf31bc81/core/src/main/java/org/apache/iceberg/DeleteFileIndex.java#L498
   
   Also when the `DeleteFile` is created, it always references the location of 
the `DataFile`: 
https://github.com/apache/iceberg/blob/f186be7c8e419a90c4b2c4af8845e24a20b016f6/core/src/main/java/org/apache/iceberg/deletes/BaseDVFileWriter.java#L130



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