diff --git a/paimon-core/src/main/java/org/apache/paimon/table/ExpireSnapshots.java b/paimon-core/src/main/java/org/apache/paimon/table/ExpireSnapshots.java index 8aa9a3e2a4d1..a4459d75fd30 100644 --- a/paimon-core/src/main/java/org/apache/paimon/table/ExpireSnapshots.java +++ b/paimon-core/src/main/java/org/apache/paimon/table/ExpireSnapshots.java @@ -29,5 +29,6 @@ public interface ExpireSnapshots { ExpireSnapshots maxDeletes(int maxDeletes); + /** @return How many snapshots have been expired. */ int expire(); } diff --git a/paimon-core/src/main/java/org/apache/paimon/table/Table.java b/paimon-core/src/main/java/org/apache/paimon/table/Table.java index 282a8b09d570..64ab6d2ab0a7 100644 --- a/paimon-core/src/main/java/org/apache/paimon/table/Table.java +++ b/paimon-core/src/main/java/org/apache/paimon/table/Table.java @@ -96,6 +96,8 @@ public interface Table extends Serializable { @Experimental void deleteBranch(String branchName); + /** Manually expire snapshots, parameters can be controlled independently of table options. */ + @Experimental ExpireSnapshots newExpireSnapshots(); // =============== Read & Write Operations ==================