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(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.