Package org.apache.druid.query
Class DimensionComparisonUtils
- java.lang.Object
-
- org.apache.druid.query.DimensionComparisonUtils
-
public class DimensionComparisonUtils extends Object
Utility class to compare dimensions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDimensionComparisonUtils.ArrayComparator<T>Creates a list comparator with custom comparator for the elements.static classDimensionComparisonUtils.ArrayComparatorForUnnaturalStringComparatorArray comparator that converts the elements to their string representation, before comparing the values using the providedStringComparator.
-
Constructor Summary
Constructors Constructor Description DimensionComparisonUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisNaturalComparator(ValueType type, StringComparator comparator)Checks if the comparator is the natural comparator for the given type.
-
-
-
Method Detail
-
isNaturalComparator
public static boolean isNaturalComparator(ValueType type, StringComparator comparator)
Checks if the comparator is the natural comparator for the given type. Natural comparator for a type is the comparator that will yield the same results as a.compareTo(b) for objects a, b belonging to that valueType. In such cases, it'll be faster to directly use the comparison methods provided by Java or the library, as using the StringComparator would be slow. MSQ only supports natural comparators
-
-