RoaringBitmap: AND between two Roaring64NavigableMaps throws unsupported operation

Describe the bug And between two bitmaps throws exception.

To Reproduce

        val x = Roaring64NavigableMap()
        val y = Roaring64NavigableMap.bitmapOf(4)
        
        x.add(123, 124)
        x.and(y)

throws

.and is not between class org.roaringbitmap.longlong.Roaring64NavigableMap and class org.roaringbitmap.buffer.MutableRoaringBitmap
java.lang.UnsupportedOperationException: .and is not between class org.roaringbitmap.longlong.Roaring64NavigableMap and class org.roaringbitmap.buffer.MutableRoaringBitmap
	at org.roaringbitmap.longlong.Roaring64NavigableMap.and(Roaring64NavigableMap.java:880)

RoaringBitmap version: 0.9.22

Java version: 16

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Should I use Roaring64Bitmap instead?

You would expect better performance with Roaring64Bitmap. Still, this Roaring64NavigableMap bug will be fixed very soon

@blacelle I am curious… What is the rationale for these code sequences to generate what are effectively non-interoperable internal types?

val x = Roaring64NavigableMap()
x.add(123, 124)
val y = Roaring64NavigableMap.bitmapOf(4)

(You don’t have to answer that… but it seems somewhat… interesting…?)