Package org.apache.druid.query.ordering
Class StringComparators.NaturalComparator
java.lang.Object
org.apache.druid.query.ordering.StringComparator
org.apache.druid.query.ordering.StringComparators.NaturalComparator
- All Implemented Interfaces:
Comparator<String>
- Enclosing class:
- StringComparators
NaturalComparator refers to the natural ordering of the type that it refers.
For example, if the type is Long, the natural ordering would be numeric
if the type is an array, the natural ordering would be lexicographic comparison of the natural ordering of the
elements in the arrays.
It is a sigil value for the dimension that we can handle in the execution layer, and don't need the comparator for.
It is also a placeholder for dimensions that we don't have a comparator for (like arrays), but is a required for
planning
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.druid.query.ordering.StringComparator
fromStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
NaturalComparator
public NaturalComparator()
-
-
Method Details
-
compare
-
toString
-
equals
- Specified by:
equalsin interfaceComparator<String>- Overrides:
equalsin classObject
-
hashCode
public int hashCode() -
getCacheKey
public byte[] getCacheKey()- Specified by:
getCacheKeyin classStringComparator
-