Package org.apache.druid.query.scan
Class ScanResultValueTimestampComparator
java.lang.Object
org.apache.druid.query.scan.ScanResultValueTimestampComparator
- All Implemented Interfaces:
Comparator<ScanResultValue>
public class ScanResultValueTimestampComparator
extends Object
implements Comparator<ScanResultValue>
This comparator class supports comparisons of ScanResultValues based on the timestamp of their first event. Since
only the first event is looked at, this Comparator is especially useful for unbatched ScanResultValues (such as in
ScanQueryQueryToolChest.mergeResults(org.apache.druid.query.QueryRunner <ScanResultValue>). The comparator takes a scanQuery as
a parameter so that it knows the result format (list or compactedList) of Object ScanResultValue#events. It uses
this result format to perform a bunch of type casts on the object to get the timestamp then compares the timestamps.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ScanResultValueTimestampComparator
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<ScanResultValue>
-