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 and they apply the filter 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: [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