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


##########
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 see, here is where my doubt was 
   group by was on min_seq and partition to find out delete file that apply at 
a partion level, and then a filter was created to find out which eq and pos 
delete file remains (doc : 
https://docs.google.com/document/d/11d-cIUR_89kRsMmWnEoxXGZCvp7L4TUmPJqUC60zB5M/edit?tab=t.0)
   
   
https://github.com/apache/iceberg/blob/f6c934b479d81f16633fe8b0b6b245133f49cd94/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RemoveDanglingDeletesSparkAction.java#L130
 
   
   now if we group by on 3 dimensions including file path of DV i.e including 
file_path, how is the condition being valid, 
   as how are finding out min seq per partition ? 
   
   
https://github.com/apache/iceberg/blob/f6c934b479d81f16633fe8b0b6b245133f49cd94/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RemoveDanglingDeletesSparkAction.java#L146



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

Reply via email to