E - encoded vector type.D - decoded vector type, which is also the dictionary type.public class SearchDictionaryEncoder<E extends BaseIntVector,D extends ValueVector> extends Object
| Constructor and Description |
|---|
SearchDictionaryEncoder(D dictionary,
VectorValueComparator<D> comparator)
Constructs a dictionary encoder.
|
SearchDictionaryEncoder(D dictionary,
VectorValueComparator<D> comparator,
boolean encodeNull)
Constructs a dictionary encoder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(D input,
E output)
Encodes an input vector by binary search.
|
public SearchDictionaryEncoder(D dictionary, VectorValueComparator<D> comparator)
dictionary - the dictionary. It must be in sorted order.comparator - the criteria for sorting.public SearchDictionaryEncoder(D dictionary, VectorValueComparator<D> comparator, boolean encodeNull)
dictionary - the dictionary. It must be in sorted order.comparator - the criteria for sorting.encodeNull - a flag indicating if null should be encoded.
It determines the behaviors for processing null values in the input during encoding/decoding.
public void encode(D input, E output)
input - the input vector.output - the output vector. Note that it must be in a fresh state. At least,
all its validity bits should be clear.Copyright © 2019 The Apache Software Foundation. All rights reserved.