public class CompositeVectorComparator extends VectorValueComparator<ValueVector>
It works by first using the first comparator, if a non-zero value is returned, it simply returns it. Otherwise, it uses the second comparator, and so on, until a non-zero value is produced, or all inner comparators have been used.
valueWidth, vector1, vector2
Constructor and Description |
---|
CompositeVectorComparator(VectorValueComparator[] innerComparators) |
Modifier and Type | Method and Description |
---|---|
int |
compare(int index1,
int index2)
Compare two values, given their indices.
|
int |
compareNotNull(int index1,
int index2)
Compare two values, given their indices.
|
VectorValueComparator<ValueVector> |
createNew()
Creates a comparator of the same type.
|
attachVector, attachVectors, checkNullsOnCompare, getValueWidth
public CompositeVectorComparator(VectorValueComparator[] innerComparators)
public int compareNotNull(int index1, int index2)
VectorValueComparator
compareNotNull
in class VectorValueComparator<ValueVector>
index1
- index of the first value to compare.index2
- index of the second value to compare.public int compare(int index1, int index2)
VectorValueComparator
compare
in class VectorValueComparator<ValueVector>
index1
- index of the first value to compare.index2
- index of the second value to compare.public VectorValueComparator<ValueVector> createNew()
VectorValueComparator
createNew
in class VectorValueComparator<ValueVector>
Copyright © 2023 The Apache Software Foundation. All rights reserved.