Package org.apache.druid.query
Class DimensionComparisonUtils
java.lang.Object
org.apache.druid.query.DimensionComparisonUtils
Utility class to compare dimensions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCreates a list comparator with custom comparator for the elements.static classArray comparator that converts the elements to their string representation, before comparing the values using the providedStringComparator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisNaturalComparator(ValueType type, StringComparator comparator) Checks if the comparator is the natural comparator for the given type.
-
Constructor Details
-
DimensionComparisonUtils
public DimensionComparisonUtils()
-
-
Method Details
-
isNaturalComparator
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
-