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
public static class StringComparators.NaturalComparator extends StringComparator
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 Constructor Description NaturalComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(String o1, String o2)booleanequals(Object o)byte[]getCacheKey()inthashCode()StringtoString()-
Methods inherited from class org.apache.druid.query.ordering.StringComparator
fromString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceComparator<String>- Overrides:
equalsin classObject
-
getCacheKey
public byte[] getCacheKey()
- Specified by:
getCacheKeyin classStringComparator
-
-