Search in sources :

Example 11 with MutableRoaringBitmap

use of org.roaringbitmap.buffer.MutableRoaringBitmap in project druid by druid-io.

the class WrappedRoaringBitmap method or.

@Override
public void or(MutableBitmap mutableBitmap) {
    WrappedRoaringBitmap other = (WrappedRoaringBitmap) mutableBitmap;
    MutableRoaringBitmap unwrappedOtherBitmap = other.bitmap;
    bitmap.or(unwrappedOtherBitmap);
}
Also used : MutableRoaringBitmap(org.roaringbitmap.buffer.MutableRoaringBitmap)

Example 12 with MutableRoaringBitmap

use of org.roaringbitmap.buffer.MutableRoaringBitmap in project druid by druid-io.

the class WrappedRoaringBitmap method intersection.

@Override
public ImmutableBitmap intersection(ImmutableBitmap otherBitmap) {
    WrappedRoaringBitmap other = (WrappedRoaringBitmap) otherBitmap;
    MutableRoaringBitmap unwrappedOtherBitmap = other.bitmap;
    return new WrappedImmutableRoaringBitmap(MutableRoaringBitmap.and(bitmap, unwrappedOtherBitmap));
}
Also used : MutableRoaringBitmap(org.roaringbitmap.buffer.MutableRoaringBitmap)

Example 13 with MutableRoaringBitmap

use of org.roaringbitmap.buffer.MutableRoaringBitmap in project druid by druid-io.

the class WrappedRoaringBitmap method xor.

@Override
public void xor(MutableBitmap mutableBitmap) {
    WrappedRoaringBitmap other = (WrappedRoaringBitmap) mutableBitmap;
    MutableRoaringBitmap unwrappedOtherBitmap = other.bitmap;
    bitmap.xor(unwrappedOtherBitmap);
}
Also used : MutableRoaringBitmap(org.roaringbitmap.buffer.MutableRoaringBitmap)

Example 14 with MutableRoaringBitmap

use of org.roaringbitmap.buffer.MutableRoaringBitmap in project druid by druid-io.

the class WrappedRoaringBitmap method union.

@Override
public ImmutableBitmap union(ImmutableBitmap otherBitmap) {
    WrappedRoaringBitmap other = (WrappedRoaringBitmap) otherBitmap;
    MutableRoaringBitmap unwrappedOtherBitmap = other.bitmap;
    return new WrappedImmutableRoaringBitmap(MutableRoaringBitmap.or(bitmap, unwrappedOtherBitmap));
}
Also used : MutableRoaringBitmap(org.roaringbitmap.buffer.MutableRoaringBitmap)

Example 15 with MutableRoaringBitmap

use of org.roaringbitmap.buffer.MutableRoaringBitmap in project druid by druid-io.

the class WrappedRoaringBitmap method difference.

@Override
public ImmutableBitmap difference(ImmutableBitmap otherBitmap) {
    WrappedRoaringBitmap other = (WrappedRoaringBitmap) otherBitmap;
    MutableRoaringBitmap unwrappedOtherBitmap = other.bitmap;
    return new WrappedImmutableRoaringBitmap(MutableRoaringBitmap.andNot(bitmap, unwrappedOtherBitmap));
}
Also used : MutableRoaringBitmap(org.roaringbitmap.buffer.MutableRoaringBitmap)

Aggregations

MutableRoaringBitmap (org.roaringbitmap.buffer.MutableRoaringBitmap)24 BlockDocIdIterator (com.linkedin.pinot.core.common.BlockDocIdIterator)5 ArrayList (java.util.ArrayList)5 ImmutableRoaringBitmap (org.roaringbitmap.buffer.ImmutableRoaringBitmap)5 DataOutputStream (java.io.DataOutputStream)4 BlockDocIdSet (com.linkedin.pinot.core.common.BlockDocIdSet)3 BitmapDocIdIterator (com.linkedin.pinot.core.operator.dociditerators.BitmapDocIdIterator)3 IntIterator (org.roaringbitmap.IntIterator)3 IntPair (com.linkedin.pinot.common.utils.Pairs.IntPair)2 AndDocIdIterator (com.linkedin.pinot.core.operator.dociditerators.AndDocIdIterator)2 RangelessBitmapDocIdIterator (com.linkedin.pinot.core.operator.dociditerators.RangelessBitmapDocIdIterator)2 ConciseSet (io.druid.extendedset.intset.ConciseSet)2 ImmutableConciseSet (io.druid.extendedset.intset.ImmutableConciseSet)2 BufferedOutputStream (java.io.BufferedOutputStream)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 File (java.io.File)2 FileOutputStream (java.io.FileOutputStream)2 BitSet (java.util.BitSet)2 BeforeClass (org.junit.BeforeClass)2 Test (org.testng.annotations.Test)2