use of org.apache.druid.collections.bitmap.WrappedRoaringBitmap in project druid by druid-io.
the class DistinctCountBufferAggregator method getMutableBitmap.
private MutableBitmap getMutableBitmap(int position) {
MutableBitmap mutableBitmap = mutableBitmapCollection.get(position);
if (mutableBitmap == null) {
mutableBitmap = new WrappedRoaringBitmap();
mutableBitmapCollection.put(position, mutableBitmap);
}
return mutableBitmap;
}
use of org.apache.druid.collections.bitmap.WrappedRoaringBitmap in project druid by druid-io.
the class VectorSelectorUtilsTest method testRoaringImmutableNullVector.
@Test
public void testRoaringImmutableNullVector() {
WrappedRoaringBitmap bitmap = new WrappedRoaringBitmap();
populate(bitmap, NULLS);
assertNullVector(bitmap.toImmutableBitmap(), NULLS);
WrappedRoaringBitmap bitmap2 = new WrappedRoaringBitmap();
populate(bitmap2, NULLS_PATTERN);
assertNullVector(bitmap2.toImmutableBitmap(), NULLS_PATTERN);
}
use of org.apache.druid.collections.bitmap.WrappedRoaringBitmap in project druid by druid-io.
the class VectorSelectorUtilsTest method testRoaringMutableNullVector.
@Test
public void testRoaringMutableNullVector() {
WrappedRoaringBitmap bitmap = new WrappedRoaringBitmap();
populate(bitmap, NULLS);
assertNullVector(bitmap, NULLS);
WrappedRoaringBitmap bitmap2 = new WrappedRoaringBitmap();
populate(bitmap2, NULLS_PATTERN);
assertNullVector(bitmap2, NULLS_PATTERN);
}
use of org.apache.druid.collections.bitmap.WrappedRoaringBitmap in project druid by druid-io.
the class NumericNullColumnSelectorTest method setup.
@Before
public void setup() {
bitmaps = new ImmutableBitmap[numBitmaps];
for (int bitmap = 0; bitmap < numBitmaps; bitmap++) {
WrappedRoaringBitmap mutable = new WrappedRoaringBitmap();
for (int i = 0; i < numRows; i++) {
if (rando.nextDouble() > 0.2) {
mutable.add(i);
}
}
bitmaps[bitmap] = mutable.toImmutableBitmap();
}
}
Aggregations