gustavoatt commented on code in PR #6992:
URL: https://github.com/apache/iceberg/pull/6992#discussion_r1125061662


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/procedures/ExpireSnapshotsProcedure.java:
##########
@@ -117,6 +122,12 @@ public InternalRow[] call(InternalRow args) {
             action.executeDeleteWith(executorService(maxConcurrentDeletes, 
"expire-snapshots"));
           }
 
+          if (wapId != null) {
+            Iterables.filter(
+                    table.snapshots(), snapshot -> 
wapId.equals(WapUtil.stagedWapId(snapshot)))
+                .forEach(snapshot -> 
action.expireSnapshotId(snapshot.snapshotId()));

Review Comment:
   @rdblue  That sounds reasonable, that way we can keep this procedure 
agnostic of `wap_id`. 
   
   We can then use this procedure after finding the snapshot ID of the wap 
write we are performing. Let me do the changes.



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