java.lang.Object
org.apache.arrow.c.CDataDictionaryProvider
- All Implemented Interfaces:
AutoCloseable,DictionaryProvider
A DictionaryProvider that is used in C Data Interface for imports.
CDataDictionaryProvider is similar to DictionaryProvider.MapDictionaryProvider with a
key difference that the dictionaries are owned by the provider so it must eventually be closed.
The typical usage is to create the CDataDictionaryProvider and pass it to Data.importField(org.apache.arrow.memory.BufferAllocator, org.apache.arrow.c.ArrowSchema, org.apache.arrow.c.CDataDictionaryProvider) or Data.importSchema(org.apache.arrow.memory.BufferAllocator, org.apache.arrow.c.ArrowSchema, org.apache.arrow.c.CDataDictionaryProvider) to allocate empty dictionaries based on the
information in ArrowSchema. Then you can re-use the same dictionary provider in any
function that imports an ArrowArray that has the same schema.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.arrow.vector.dictionary.DictionaryProvider
DictionaryProvider.MapDictionaryProvider -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CDataDictionaryProvider
public CDataDictionaryProvider()
-
-
Method Details
-
getDictionaryIds
Description copied from interface:DictionaryProviderGet all dictionary IDs.- Specified by:
getDictionaryIdsin interfaceDictionaryProvider
-
lookup
Description copied from interface:DictionaryProviderReturn the dictionary for the given ID.- Specified by:
lookupin interfaceDictionaryProvider
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-