Package org.apache.druid.query
Class DefaultBitmapResultFactory
java.lang.Object
org.apache.druid.query.DefaultBitmapResultFactory
- All Implemented Interfaces:
BitmapResultFactory<ImmutableBitmap>
public final class DefaultBitmapResultFactory
extends Object
implements BitmapResultFactory<ImmutableBitmap>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomplement(ImmutableBitmap bitmapResult, int numRows) Delegates toBitmapFactory.complement(ImmutableBitmap, int)on the wrapped bitmap, and returns a bitmap result wrapping the resulting complement ImmutableBitmap.intersection(Iterable<ImmutableBitmap> bitmapResults) Delegates toBitmapFactory.intersection(Iterable)on the wrapped bitmaps, and returns a bitmap result wrapping the resulting intersection ImmutableBitmap.booleanisEmpty(ImmutableBitmap bitmapResult) Checks that the wrapped bitmap is empty, seeImmutableBitmap.isEmpty().toImmutableBitmap(ImmutableBitmap bitmapResult) Unwraps bitmapResult back to ImmutableBitmap.union(Iterable<ImmutableBitmap> bitmapResults) Delegates toBitmapFactory.union(Iterable)on the wrapped bitmaps, and returns a bitmap result wrapping the resulting union ImmutableBitmap.unionDimensionValueBitmaps(Iterable<ImmutableBitmap> dimensionValueBitmaps) Equivalent of intersection(Iterables.transform(dimensionValueBitmaps, factory::wrapDimensionValue)), but doesn't create a lot of bitmap result objects.wrapAllFalse(ImmutableBitmap allFalseBitmap) Wraps a bitmap which is a result ofBitmapFactory.makeEmptyImmutableBitmap()call.wrapAllTrue(ImmutableBitmap allTrueBitmap) Wraps a bitmap which is a result ofBitmapFactory.complement(ImmutableBitmap, int)called withBitmapFactory.makeEmptyImmutableBitmap()as argument.wrapDimensionValue(ImmutableBitmap bitmap) Wraps a bitmap which designates rows in a segment with some specific dimension value.
-
Constructor Details
-
DefaultBitmapResultFactory
-
-
Method Details
-
wrapDimensionValue
Description copied from interface:BitmapResultFactoryWraps a bitmap which designates rows in a segment with some specific dimension value.- Specified by:
wrapDimensionValuein interfaceBitmapResultFactory<ImmutableBitmap>
-
wrapAllFalse
Description copied from interface:BitmapResultFactoryWraps a bitmap which is a result ofBitmapFactory.makeEmptyImmutableBitmap()call.- Specified by:
wrapAllFalsein interfaceBitmapResultFactory<ImmutableBitmap>
-
wrapAllTrue
Description copied from interface:BitmapResultFactoryWraps a bitmap which is a result ofBitmapFactory.complement(ImmutableBitmap, int)called withBitmapFactory.makeEmptyImmutableBitmap()as argument.- Specified by:
wrapAllTruein interfaceBitmapResultFactory<ImmutableBitmap>
-
isEmpty
Description copied from interface:BitmapResultFactoryChecks that the wrapped bitmap is empty, seeImmutableBitmap.isEmpty().- Specified by:
isEmptyin interfaceBitmapResultFactory<ImmutableBitmap>
-
intersection
Description copied from interface:BitmapResultFactoryDelegates toBitmapFactory.intersection(Iterable)on the wrapped bitmaps, and returns a bitmap result wrapping the resulting intersection ImmutableBitmap.- Specified by:
intersectionin interfaceBitmapResultFactory<ImmutableBitmap>
-
union
Description copied from interface:BitmapResultFactoryDelegates toBitmapFactory.union(Iterable)on the wrapped bitmaps, and returns a bitmap result wrapping the resulting union ImmutableBitmap.- Specified by:
unionin interfaceBitmapResultFactory<ImmutableBitmap>
-
unionDimensionValueBitmaps
Description copied from interface:BitmapResultFactoryEquivalent of intersection(Iterables.transform(dimensionValueBitmaps, factory::wrapDimensionValue)), but doesn't create a lot of bitmap result objects.- Specified by:
unionDimensionValueBitmapsin interfaceBitmapResultFactory<ImmutableBitmap>
-
complement
Description copied from interface:BitmapResultFactoryDelegates toBitmapFactory.complement(ImmutableBitmap, int)on the wrapped bitmap, and returns a bitmap result wrapping the resulting complement ImmutableBitmap.- Specified by:
complementin interfaceBitmapResultFactory<ImmutableBitmap>
-
toImmutableBitmap
Description copied from interface:BitmapResultFactoryUnwraps bitmapResult back to ImmutableBitmap. BitmapResultFactory should emit query metric dimension(s) in the implementation of this method.- Specified by:
toImmutableBitmapin interfaceBitmapResultFactory<ImmutableBitmap>
-