Module org.apache.arrow.algorithm
Package org.apache.arrow.algorithm.sort
Class FixedWidthInPlaceVectorSorter<V extends BaseFixedWidthVector>
java.lang.Object
org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter<V>
- Type Parameters:
V
- vector type.
- All Implemented Interfaces:
InPlaceVectorSorter<V>
public class FixedWidthInPlaceVectorSorter<V extends BaseFixedWidthVector>
extends Object
implements InPlaceVectorSorter<V>
Default in-place sorter for fixed-width vectors. It is based on quick-sort, with average time
complexity O(n*log(n)).
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
If the number of items is smaller than this threshold, we will use another algorithm to sort the data. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sortInPlace
(V vec, VectorValueComparator<V> comparator) Sort a vector in-place.
-
Field Details
-
CHANGE_ALGORITHM_THRESHOLD
public static final int CHANGE_ALGORITHM_THRESHOLDIf the number of items is smaller than this threshold, we will use another algorithm to sort the data.- See Also:
-
-
Constructor Details
-
FixedWidthInPlaceVectorSorter
public FixedWidthInPlaceVectorSorter()
-
-
Method Details
-
sortInPlace
Description copied from interface:InPlaceVectorSorter
Sort a vector in-place.- Specified by:
sortInPlace
in interfaceInPlaceVectorSorter<V extends BaseFixedWidthVector>
- Parameters:
vec
- the vector to sort.comparator
- the criteria for sort.
-