Class DictionaryUtility

java.lang.Object
org.apache.arrow.vector.util.DictionaryUtility

public class DictionaryUtility extends Object
Utility methods for working with Dictionaries used in Dictionary encodings.
  • Method Details

    • toMessageFormat

      public static Field toMessageFormat(Field field, DictionaryProvider provider, Set<Long> dictionaryIdsUsed)
      Convert field and child fields that have a dictionary encoding to message format, so fields have the dictionary type.

      NOTE: in the message format, fields have the dictionary type in the memory format, they have the index type

    • needConvertToMessageFormat

      public static boolean needConvertToMessageFormat(Field field)
      Checks if it is required to convert the field to message format.
      Parameters:
      field - the field to check.
      Returns:
      true if a conversion is required, and false otherwise.
    • toMemoryFormat

      public static Field toMemoryFormat(Field field, BufferAllocator allocator, Map<Long,Dictionary> dictionaries)
      Convert field and child fields that have a dictionary encoding to memory format, so fields have the index type.