aokolnychyi commented on code in PR #8755:
URL: https://github.com/apache/iceberg/pull/8755#discussion_r1412657382


##########
core/src/main/java/org/apache/iceberg/util/SnapshotUtil.java:
##########
@@ -500,4 +501,21 @@ public static Snapshot latestSnapshot(TableMetadata 
metadata, String branch) {
 
     return metadata.snapshot(ref.snapshotId());
   }
+
+  /**
+   * Checks if a particular branch of the table may contain deletes based on 
snapshot summary.
+   *
+   * @param table a {@link Table}
+   * @param branch branch name of the table (nullable)
+   * @return true if the branch may contain deletes
+   */
+  public static boolean mayHaveDeletes(Table table, String branch) {
+    Snapshot snapshot = latestSnapshot(table, branch);
+    if (snapshot == null) {
+      return false;
+    }
+
+    String value = 
snapshot.summary().get(SnapshotSummary.TOTAL_DELETE_FILES_PROP);

Review Comment:
   That's a good idea, I'll add a note.



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to