Package org.apache.druid.segment.index
Class AllUnknownBitmapColumnIndex
java.lang.Object
org.apache.druid.segment.index.AllUnknownBitmapColumnIndex
- All Implemented Interfaces:
BitmapColumnIndex
Like
AllFalseBitmapColumnIndex during normal operation, except if called with 'includeUnknowns' becomes like
AllTrueBitmapColumnIndex.-
Constructor Summary
ConstructorsConstructorDescriptionAllUnknownBitmapColumnIndex(BitmapFactory bitmapFactory, int numRows) AllUnknownBitmapColumnIndex(ColumnIndexSelector indexSelector) -
Method Summary
Modifier and TypeMethodDescription<T> TcomputeBitmapResult(BitmapResultFactory<T> bitmapResultFactory, boolean includeUnknown) Compute a bitmap result wrapped with theBitmapResultFactoryrepresenting the rows matched by this index.intReturns an estimated cost for computing the bitmap result.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.segment.index.BitmapColumnIndex
computeBitmapResult
-
Constructor Details
-
AllUnknownBitmapColumnIndex
-
AllUnknownBitmapColumnIndex
-
-
Method Details
-
getIndexCapabilities
- Specified by:
getIndexCapabilitiesin interfaceBitmapColumnIndex
-
estimatedComputeCost
public int estimatedComputeCost()Description copied from interface:BitmapColumnIndexReturns an estimated cost for computing the bitmap result. Generally this is equivalent to number of bitmap union or intersection operations need to be performed. E.x. null value index bitmap has a cost of 0, non-null value index bitmap union with null bitmap has a cost of 1, range (size of 10) scanning index bitmap union with null bitmap has a cost of 10.- Specified by:
estimatedComputeCostin interfaceBitmapColumnIndex
-
computeBitmapResult
public <T> T computeBitmapResult(BitmapResultFactory<T> bitmapResultFactory, boolean includeUnknown) Description copied from interface:BitmapColumnIndexCompute a bitmap result wrapped with theBitmapResultFactoryrepresenting the rows matched by this index. If building a cursor, useBitmapColumnIndex.computeBitmapResult(BitmapResultFactory, int, int, boolean)instead.- Specified by:
computeBitmapResultin interfaceBitmapColumnIndex- Parameters:
bitmapResultFactory- helper to format theImmutableBitmapin a form ready for consumption by callersincludeUnknown- mapping for Druid native two state logic system into SQL three-state logic system. If set to true, bitmaps returned by this method should include true bits for any rows where the matching result is 'unknown', such as from the input being null valued.- Returns:
- bitmap result representing rows matched by this index
-