use of io.druid.extendedset.intset.ImmutableConciseSet in project druid by druid-io.
the class ConciseComplementBenchmark method uncompressed.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void uncompressed(Blackhole blackhole) {
final ImmutableConciseSet set = ImmutableConciseSet.complement(null, emptyRows);
blackhole.consume(set);
assert (emptyRows == set.size());
}
use of io.druid.extendedset.intset.ImmutableConciseSet in project druid by druid-io.
the class BitmapBenchmark method makeOffheapConcise.
protected static ImmutableConciseSet makeOffheapConcise(ImmutableConciseSet concise) {
final byte[] bytes = concise.toBytes();
totalConciseBytes += bytes.length;
conciseCount++;
final ByteBuffer buf = ByteBuffer.allocateDirect(bytes.length).put(bytes);
buf.rewind();
return new ImmutableConciseSet(buf);
}
use of io.druid.extendedset.intset.ImmutableConciseSet in project druid by druid-io.
the class WrappedImmutableConciseBitmap method intersection.
@Override
public ImmutableBitmap intersection(ImmutableBitmap otherBitmap) {
WrappedImmutableConciseBitmap other = (WrappedImmutableConciseBitmap) otherBitmap;
ImmutableConciseSet unwrappedOtherBitmap = other.bitmap;
return new WrappedImmutableConciseBitmap(ImmutableConciseSet.intersection(bitmap, unwrappedOtherBitmap));
}
use of io.druid.extendedset.intset.ImmutableConciseSet in project druid by druid-io.
the class WrappedImmutableConciseBitmap method union.
@Override
public ImmutableBitmap union(ImmutableBitmap otherBitmap) {
WrappedImmutableConciseBitmap other = (WrappedImmutableConciseBitmap) otherBitmap;
ImmutableConciseSet unwrappedOtherBitmap = other.bitmap;
return new WrappedImmutableConciseBitmap(ImmutableConciseSet.union(bitmap, unwrappedOtherBitmap));
}
use of io.druid.extendedset.intset.ImmutableConciseSet in project druid by druid-io.
the class WrappedImmutableConciseBitmap method difference.
@Override
public ImmutableBitmap difference(ImmutableBitmap otherBitmap) {
WrappedImmutableConciseBitmap other = (WrappedImmutableConciseBitmap) otherBitmap;
ImmutableConciseSet unwrappedOtherBitmap = other.bitmap;
return new WrappedImmutableConciseBitmap(ImmutableConciseSet.intersection(bitmap, ImmutableConciseSet.complement(unwrappedOtherBitmap)));
}
Aggregations