Class DictionaryProvider.MapDictionaryProvider
java.lang.Object
org.apache.arrow.vector.dictionary.DictionaryProvider.MapDictionaryProvider
- All Implemented Interfaces:
AutoCloseable
,DictionaryProvider
- Enclosing interface:
- DictionaryProvider
public static class DictionaryProvider.MapDictionaryProvider
extends Object
implements AutoCloseable, DictionaryProvider
Implementation of
DictionaryProvider
that is backed by a hash-map.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.arrow.vector.dictionary.DictionaryProvider
DictionaryProvider.MapDictionaryProvider
-
Constructor Summary
ConstructorDescriptionMapDictionaryProvider
(Dictionary... dictionaries) Constructs a new instance from the given dictionaries. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
copyStructureFrom
(DictionaryProvider other, BufferAllocator allocator) Initialize the map structure from another provider, but with empty vectors.Get all dictionary IDs.lookup
(long id) Return the dictionary for the given ID.void
put
(Dictionary dictionary)
-
Constructor Details
-
MapDictionaryProvider
Constructs a new instance from the given dictionaries.
-
-
Method Details
-
copyStructureFrom
Initialize the map structure from another provider, but with empty vectors.- Parameters:
other
- theDictionaryProvider
to copy the ids and fields fromallocator
- allocator to create the empty vectors
-
put
-
getDictionaryIds
Description copied from interface:DictionaryProvider
Get all dictionary IDs.- Specified by:
getDictionaryIds
in interfaceDictionaryProvider
-
lookup
Description copied from interface:DictionaryProvider
Return the dictionary for the given ID.- Specified by:
lookup
in interfaceDictionaryProvider
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-