Package org.apache.druid.segment.index
Class IndexedUtf8ValueIndexes<TDictionary extends Indexed<ByteBuffer>>
java.lang.Object
org.apache.druid.segment.index.IndexedUtf8ValueIndexes<TDictionary>
- All Implemented Interfaces:
StringValueSetIndexes,Utf8ValueSetIndexes,ValueIndexes,ValueSetIndexes
public final class IndexedUtf8ValueIndexes<TDictionary extends Indexed<ByteBuffer>>
extends Object
implements StringValueSetIndexes, Utf8ValueSetIndexes, ValueIndexes, ValueSetIndexes
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.segment.index.semantic.ValueSetIndexes
ValueSetIndexes.BaseValueSetIndexesFromIterable -
Field Summary
Fields inherited from interface org.apache.druid.segment.index.semantic.ValueSetIndexes
SORTED_SCAN_RATIO_THRESHOLD -
Constructor Summary
ConstructorsConstructorDescriptionIndexedUtf8ValueIndexes(BitmapFactory bitmapFactory, TDictionary dictionary, Indexed<ImmutableBitmap> bitmaps) -
Method Summary
Modifier and TypeMethodDescriptionforSortedValues(List<?> sortedValues, TypeSignature<ValueType> matchValueType) Get the wrappedImmutableBitmapcorresponding to the specified set of values (if they are contained in the underlying column).forSortedValues(SortedSet<String> values) Get the wrappedImmutableBitmapcorresponding to the specified set of values (if they are contained in the underlying column).forSortedValuesUtf8(List<ByteBuffer> sortedValuesUtf8) Get the wrappedImmutableBitmapcorresponding to the specified set of values (if they are contained in the underlying column).forValue(Object value, TypeSignature<ValueType> valueType) Get aBitmapColumnIndexwhich can compute theImmutableBitmapcorresponding to rows matching the supplied value.Get the wrappedImmutableBitmapcorresponding to the supplied value.
-
Constructor Details
-
IndexedUtf8ValueIndexes
public IndexedUtf8ValueIndexes(BitmapFactory bitmapFactory, TDictionary dictionary, Indexed<ImmutableBitmap> bitmaps)
-
-
Method Details
-
forValue
Description copied from interface:StringValueSetIndexesGet the wrappedImmutableBitmapcorresponding to the supplied value. Generates an empty bitmap when passed a value that doesn't exist. Never returns null.- Specified by:
forValuein interfaceStringValueSetIndexes
-
forValue
@Nullable public BitmapColumnIndex forValue(@Nonnull Object value, TypeSignature<ValueType> valueType) Description copied from interface:ValueIndexesGet aBitmapColumnIndexwhich can compute theImmutableBitmapcorresponding to rows matching the supplied value. Generates an empty bitmap when passed a value that doesn't exist. May return null if a value index cannot be computed for the supplied value type.Does not match null, use
NullValueIndexfor matching nulls.- Specified by:
forValuein interfaceValueIndexes- Parameters:
value- value to matchvalueType- type of the value to match, used to assist conversion from the match value type to the column value type- Returns:
ImmutableBitmapcorresponding to the rows which match the value, or null if an index connot be computed for the supplied value type
-
forSortedValues
Description copied from interface:StringValueSetIndexesGet the wrappedImmutableBitmapcorresponding to the specified set of values (if they are contained in the underlying column). The set must be sorted usingComparators.naturalNullsFirst().- Specified by:
forSortedValuesin interfaceStringValueSetIndexes
-
forSortedValuesUtf8
Description copied from interface:Utf8ValueSetIndexesGet the wrappedImmutableBitmapcorresponding to the specified set of values (if they are contained in the underlying column). The set must be sorted usingByteBufferUtils.utf8Comparator().- Specified by:
forSortedValuesUtf8in interfaceUtf8ValueSetIndexes
-
forSortedValues
@Nullable public BitmapColumnIndex forSortedValues(@Nonnull List<?> sortedValues, TypeSignature<ValueType> matchValueType) Description copied from interface:ValueSetIndexesGet the wrappedImmutableBitmapcorresponding to the specified set of values (if they are contained in the underlying column). The set must be sorted using the comparator of the supplied matchValueType.- Specified by:
forSortedValuesin interfaceValueSetIndexes- Parameters:
sortedValues- values to match, sorted in matchValueType ordermatchValueType- type of the value to match, used to assist conversion from the match value type to the column value type- Returns:
ImmutableBitmapcorresponding to the rows which match the values, or null if an index connot be computed for the supplied value type
-