RussellSpitzer commented on a change in pull request #1874:
URL: https://github.com/apache/iceberg/pull/1874#discussion_r536115248



##########
File path: 
spark3/src/main/java/org/apache/iceberg/spark/procedures/ExpireSnapshotsProcedure.java
##########
@@ -96,6 +75,36 @@ public StructType outputType() {
     return OUTPUT_TYPE;
   }
 
+  @Override
+  public InternalRow[] call(InternalRow args) {
+    String namespace = args.getString(0);
+    String tableName = args.getString(1);
+    Long olderThanMillis = args.isNullAt(2) ? null : 
DateTimeUtils.toMillis(args.getLong(2));
+    Integer retainLastNum = args.isNullAt(3) ? null : args.getInt(3);
+
+    return modifyIcebergTable(namespace, tableName, table -> {
+      Actions actions = Actions.forTable(table);
+
+      ExpireSnapshotsAction action = actions.expireSnapshots();
+
+      if (olderThanMillis != null) {
+        action.expireOlderThan(olderThanMillis);

Review comment:
       So we are going with the action default expire time? Just checking 
because I thougt some folks wanted that changed




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

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