rdblue commented on code in PR #6992:
URL: https://github.com/apache/iceberg/pull/6992#discussion_r1125055864
##########
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:
I'm not sure about this. I expect the procedures to expose similar options
as the table operations, but this is actually creating an option that doesn't
exist in `expireSnapshots`. What about a more consistent way to do this? We
could allow passing an array of snapshot IDs, for example, that would bake down
to `expireSnapshotId` calls like this.
What do you think?
--
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]