You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "gustavoatt (via GitHub)" <gi...@apache.org> on 2023/03/03 22:05:53 UTC
[GitHub] [iceberg] gustavoatt commented on a diff in pull request #6992: Expire snapshots procedure takes a wap_id
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org