Class MapIndex
java.lang.Object
org.apache.druid.segment.join.table.MapIndex
- All Implemented Interfaces:
IndexedTable.Index
An
IndexedTable.Index backed by a Map.-
Field Summary
Fields inherited from interface org.apache.druid.segment.join.table.IndexedTable.Index
NOT_FOUND -
Method Summary
Modifier and TypeMethodDescriptionbooleanareKeysUnique(boolean includeNull) Returns whether keys are unique in this index.it.unimi.dsi.fastutil.ints.IntSortedSetReturns the list of row numbers corresponding to "key" in this index.intfindUniqueLong(long key) Returns the row number corresponding to "key" in this index, orIndexedTable.Index.NOT_FOUNDif the key does not exist in the index.keyType()Returns the natural key type for the index.
-
Method Details
-
keyType
Description copied from interface:IndexedTable.IndexReturns the natural key type for the index.- Specified by:
keyTypein interfaceIndexedTable.Index
-
areKeysUnique
public boolean areKeysUnique(boolean includeNull) Description copied from interface:IndexedTable.IndexReturns whether keys are unique in this index. If this returns true, thenIndexedTable.Index.find(Object)will only ever return a zero- or one-element list.- Specified by:
areKeysUniquein interfaceIndexedTable.Index- Parameters:
includeNull- whether null is considered a valid key
-
find
Description copied from interface:IndexedTable.IndexReturns the list of row numbers corresponding to "key" in this index. If "key" is some type other than the natural typeIndexedTable.Index.keyType(), it will be converted before checking the index.- Specified by:
findin interfaceIndexedTable.Index
-
findUniqueLong
public int findUniqueLong(long key) Description copied from interface:IndexedTable.IndexReturns the row number corresponding to "key" in this index, orIndexedTable.Index.NOT_FOUNDif the key does not exist in the index. It is only valid to call this method ifIndexedTable.Index.keyType()isValueType.LONGandIndexedTable.Index.areKeysUnique(boolean)returns true.- Specified by:
findUniqueLongin interfaceIndexedTable.Index
-