nastra commented on code in PR #12270: URL: https://github.com/apache/iceberg/pull/12270#discussion_r1971224641
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RemoveDanglingDeletesSparkAction.java: ########## @@ -124,10 +125,15 @@ private List<DeleteFile> findDanglingDeletes() { .selectExpr( "data_file.partition as partition", "data_file.spec_id as spec_id", - "sequence_number") - .groupBy("partition", "spec_id") + "sequence_number", + "data_file.file_path as file_path") + .groupBy("partition", "spec_id", "file_path") .agg(min("sequence_number")) - .toDF("grouped_partition", "grouped_spec_id", "min_data_sequence_number"); + .toDF( + "grouped_partition", + "grouped_spec_id", + "data_file_path", + "min_data_sequence_number"); Review Comment: I don't think this is necessary, because a DV not pointing to a valid data file path is implicitly a dangling delete. I've added a comment -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org