V - the dictionary vector type.public interface DictionaryBuilder<V extends ValueVector>
The dictionary builder is intended to build a single dictionary. So it cannot be used for different dictionaries.
Below gives the sample code for using the dictionary builder
DictionaryBuilder dictionaryBuilder = ...
...
dictionaryBuild.addValue(newValue);
...
With the above code, the dictionary vector will be populated,
and it can be retrieved by the getDictionary() method.
After that, dictionary encoding can proceed with the populated dictionary..
| Modifier and Type | Method and Description |
|---|---|
int |
addValue(V targetVector,
int targetIndex)
Try to add an element from the target vector to the dictionary.
|
int |
addValues(V targetVector)
Try to add all values from the target vector to the dictionary.
|
V |
getDictionary()
Gets the dictionary built.
|
int addValues(V targetVector)
targetVector - the target vector containing values to probe.int addValue(V targetVector, int targetIndex)
targetVector - the target vector containing new element.targetIndex - the index of the new element in the target vector.V getDictionary()
Copyright © 2024 The Apache Software Foundation. All rights reserved.