Package org.apache.arrow.vector.util
Class DictionaryUtility
java.lang.Object
org.apache.arrow.vector.util.DictionaryUtility
Utility methods for working with Dictionaries used in Dictionary encodings.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
needConvertToMessageFormat
(Field field) Checks if it is required to convert the field to message format.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.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.
-
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
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.
-