java.lang.Object
org.apache.arrow.vector.dictionary.DictionaryHashTable
HashTable used for Dictionary encoding. It holds two vectors (the vector to encode and dictionary
vector) It stores the index in dictionary vector and for a given index in encode vector, it could
return dictionary index.
-
Constructor Summary
ConstructorDescriptionDictionaryHashTable
(int initialCapacity, ValueVector dictionary, ArrowBufHasher hasher) Constructs an empty map with the specified initial capacity and load factor.DictionaryHashTable
(ValueVector dictionary) DictionaryHashTable
(ValueVector dictionary, ArrowBufHasher hasher) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all elements from this map, leaving it empty.int
getIndex
(int indexInArray, ValueVector toEncode) get the corresponding dictionary index with the given index in vector which to encode.int
size()
Returns the number of mappings in this Map.
-
Constructor Details
-
DictionaryHashTable
Constructs an empty map with the specified initial capacity and load factor. -
DictionaryHashTable
-
DictionaryHashTable
-
-
Method Details
-
getIndex
get the corresponding dictionary index with the given index in vector which to encode.- Parameters:
indexInArray
- index in vector.- Returns:
- dictionary vector index or -1 if no value equals.
-
size
public int size()Returns the number of mappings in this Map. -
clear
public void clear()Removes all elements from this map, leaving it empty.
-