public class CDataDictionaryProvider extends Object implements DictionaryProvider, AutoCloseable
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.
DictionaryProvider.MapDictionaryProvider| Constructor and Description |
|---|
CDataDictionaryProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Set<Long> |
getDictionaryIds() |
Dictionary |
lookup(long id) |
public final Set<Long> getDictionaryIds()
getDictionaryIds in interface DictionaryProviderpublic Dictionary lookup(long id)
lookup in interface DictionaryProviderpublic void close()
close in interface AutoCloseableCopyright © 2024 The Apache Software Foundation. All rights reserved.