This is an automated email from the ASF dual-hosted git repository.

xxubai pushed a commit to branch 0.9.x
in repository https://gitbox.apache.org/repos/asf/amoro.git

commit 25b2a8809f5ca7976246e734a68b916d387db7e0
Author: byungnam <[email protected]>
AuthorDate: Wed Jul 22 16:06:48 2026 +0900

    [AMORO-4274] Remove Roaring64Bitmap.isEmpty() check in CombinedDelete… 
(#4275)
    
    [AMORO-4274] Remove Roaring64Bitmap.isEmpty() check in CombinedDeleteFilter
    
    positionMap is populated only via computeIfAbsent(...).add(...) while 
reading
    position-delete files, so any stored value is a non-empty Roaring64Bitmap.
    positionMap.get(...) therefore returns null or a non-empty bitmap, never an
    empty one, making the isEmpty() branch unreachable.
    
    Roaring64Bitmap.isEmpty() is backed by getLongCardinality(), which traverses
    all containers, so calling it once per scanned record wastes CPU on the hot
    path. Drop the check and keep only the null guard; behavior is unchanged.
    
    Close #4274
    
    (cherry picked from commit 0cb625072686a58d32af00939d919569a7185586)
---
 .../src/main/java/org/apache/amoro/io/reader/CombinedDeleteFilter.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/amoro-format-iceberg/src/main/java/org/apache/amoro/io/reader/CombinedDeleteFilter.java
 
b/amoro-format-iceberg/src/main/java/org/apache/amoro/io/reader/CombinedDeleteFilter.java
index d184ffcde..6440f0ff2 100644
--- 
a/amoro-format-iceberg/src/main/java/org/apache/amoro/io/reader/CombinedDeleteFilter.java
+++ 
b/amoro-format-iceberg/src/main/java/org/apache/amoro/io/reader/CombinedDeleteFilter.java
@@ -415,7 +415,7 @@ public abstract class CombinedDeleteFilter<T extends 
StructLike> {
     return structLikeForDelete -> {
       Roaring64Bitmap posSet = positionMap.get(structLikeForDelete.filePath());
 
-      if (posSet == null || posSet.isEmpty()) {
+      if (posSet == null) {
         return false;
       }
       return posSet.contains(structLikeForDelete.getPosition());

Reply via email to