Class DictionaryHashTable


public class DictionaryHashTable extends Object
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 Details

    • DictionaryHashTable

      public DictionaryHashTable(int initialCapacity, ValueVector dictionary, ArrowBufHasher hasher)
      Constructs an empty map with the specified initial capacity and load factor.
    • DictionaryHashTable

      public DictionaryHashTable(ValueVector dictionary, ArrowBufHasher hasher)
    • DictionaryHashTable

      public DictionaryHashTable(ValueVector dictionary)
  • Method Details

    • getIndex

      public int getIndex(int indexInArray, ValueVector toEncode)
      get the corresponding dictionary index with the given index in vector which to encode.
      indexInArray - index in vector.
      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.