Search in sources :

Example 11 with WrappedImmutableRoaringBitmap

use of org.apache.druid.collections.bitmap.WrappedImmutableRoaringBitmap in project druid by druid-io.

the class BaseColumnarLongsBenchmark method setupContiguousBitmapFilter.

private void setupContiguousBitmapFilter(int rows, int filterRowCount, int startOffset) {
    MutableRoaringBitmap bitmap = new MutableRoaringBitmap();
    for (int i = startOffset; i < filterRowCount; i++) {
        bitmap.add(i);
    }
    offset = BitmapOffset.of(new WrappedImmutableRoaringBitmap(bitmap.toImmutableRoaringBitmap()), false, rows);
    vectorOffset = new BitmapVectorOffset(VECTOR_SIZE, new WrappedImmutableRoaringBitmap(bitmap.toImmutableRoaringBitmap()), startOffset, rows);
}
Also used : MutableRoaringBitmap(org.roaringbitmap.buffer.MutableRoaringBitmap) BitmapVectorOffset(org.apache.druid.segment.vector.BitmapVectorOffset) WrappedImmutableRoaringBitmap(org.apache.druid.collections.bitmap.WrappedImmutableRoaringBitmap)

Aggregations

WrappedImmutableRoaringBitmap (org.apache.druid.collections.bitmap.WrappedImmutableRoaringBitmap)11 MutableRoaringBitmap (org.roaringbitmap.buffer.MutableRoaringBitmap)9 ImmutableBitmap (org.apache.druid.collections.bitmap.ImmutableBitmap)6 Test (org.junit.Test)5 BitmapVectorOffset (org.apache.druid.segment.vector.BitmapVectorOffset)3 WrappedImmutableConciseBitmap (org.apache.druid.collections.bitmap.WrappedImmutableConciseBitmap)2 ImmutableConciseSet (org.apache.druid.extendedset.intset.ImmutableConciseSet)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 DataOutputStream (java.io.DataOutputStream)1 ByteBuffer (java.nio.ByteBuffer)1 BitSet (java.util.BitSet)1 MutableBitmap (org.apache.druid.collections.bitmap.MutableBitmap)1 ConciseSet (org.apache.druid.extendedset.intset.ConciseSet)1 EmptyIntIterator (org.apache.druid.extendedset.intset.EmptyIntIterator)1 IAE (org.apache.druid.java.util.common.IAE)1 Setup (org.openjdk.jmh.annotations.Setup)1 IntIterator (org.roaringbitmap.IntIterator)1 ImmutableRoaringBitmap (org.roaringbitmap.buffer.ImmutableRoaringBitmap)1