public class StructSubfieldEncoder extends Object
StructVector
.
Notes that child vectors within struct vector can either be dictionary encodable or not.Constructor and Description |
---|
StructSubfieldEncoder(BufferAllocator allocator,
DictionaryProvider.MapDictionaryProvider provider)
Construct an instance.
|
StructSubfieldEncoder(BufferAllocator allocator,
DictionaryProvider.MapDictionaryProvider provider,
ArrowBufHasher hasher)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
StructVector |
decode(StructVector vector)
Decodes a dictionary subfields encoded vector using the provided dictionary.
|
StructVector |
encode(StructVector vector,
Map<Integer,Long> columnToDictionaryId)
Dictionary encodes subfields for complex vector with a provided dictionary.
|
public StructSubfieldEncoder(BufferAllocator allocator, DictionaryProvider.MapDictionaryProvider provider)
public StructSubfieldEncoder(BufferAllocator allocator, DictionaryProvider.MapDictionaryProvider provider, ArrowBufHasher hasher)
public StructVector encode(StructVector vector, Map<Integer,Long> columnToDictionaryId)
vector
- vector to encodecolumnToDictionaryId
- the mappings between child vector index and dictionary id. A null dictionary
id indicates the child vector is not encodable.public StructVector decode(StructVector vector)
vector
- dictionary encoded vector, its child vector must be int typeCopyright © 2020 The Apache Software Foundation. All rights reserved.