Class CDataDictionaryProvider

java.lang.Object
org.apache.arrow.c.CDataDictionaryProvider
All Implemented Interfaces:
AutoCloseable, DictionaryProvider

public class CDataDictionaryProvider extends Object implements DictionaryProvider, AutoCloseable
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(BufferAllocator, ArrowSchema, CDataDictionaryProvider) or Data.importSchema(BufferAllocator, ArrowSchema, 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.