Class SortUtils.SortComparator
- java.lang.Object
-
- org.apache.pinot.query.runtime.operator.utils.SortUtils.SortComparator
-
- All Implemented Interfaces:
Comparator<Object[]>
- Enclosing class:
- SortUtils
public static class SortUtils.SortComparator extends Object implements Comparator<Object[]>
-
-
Constructor Summary
Constructors Constructor Description SortComparator(List<RexExpression> collationKeys, List<org.apache.calcite.rel.RelFieldCollation.Direction> collationDirections, List<org.apache.calcite.rel.RelFieldCollation.NullDirection> collationNullDirections, DataSchema dataSchema, boolean switchDirections)Sort comparator for use with priority queues.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Object[] o1, Object[] o2)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
SortComparator
public SortComparator(List<RexExpression> collationKeys, List<org.apache.calcite.rel.RelFieldCollation.Direction> collationDirections, List<org.apache.calcite.rel.RelFieldCollation.NullDirection> collationNullDirections, DataSchema dataSchema, boolean switchDirections)
Sort comparator for use with priority queues.- Parameters:
collationKeys- collation keys to sort oncollationDirections- collation direction for each collation key to sort oncollationNullDirections- collation direction for NULL values in each collation key to sort ondataSchema- data schema to useswitchDirections- 'true' if the opposite sort direction should be used as what is specified
-
-
Method Detail
-
compare
public int compare(Object[] o1, Object[] o2)
- Specified by:
comparein interfaceComparator<Object[]>
-
-