You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/04/22 23:17:35 UTC

[GitHub] [iceberg] kbendick commented on a diff in pull request #4588: Spark: Add custom metric for number of deletes applied by a SparkScan

kbendick commented on code in PR #4588:
URL: https://github.com/apache/iceberg/pull/4588#discussion_r856665333


##########
core/src/main/java/org/apache/iceberg/deletes/BitmapPositionDeleteIndex.java:
##########
@@ -40,7 +46,11 @@ public void delete(long posStart, long posEnd) {
 
   @Override
   public boolean isDeleted(long position) {
-    return roaring64Bitmap.contains(position);
+    boolean posIsDeleted = roaring64Bitmap.contains(position);
+    if (counter != null && posIsDeleted) {
+      counter.increment();
+    }

Review Comment:
   Given that we have defined the `DeleteCounter` interface ourselves, does it make sense to define a default `NullDeleteCounter` that is a no-op?
   
   There are a number of places where we check `if (counter != null)`.



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