vincentchenjl commented on a change in pull request #6269:
URL: https://github.com/apache/incubator-pinot/pull/6269#discussion_r525538176



##########
File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/MergeWrapper.java
##########
@@ -66,12 +66,12 @@
   protected static final Comparator<MergedAnomalyResultDTO> COMPARATOR = new 
Comparator<MergedAnomalyResultDTO>() {
     @Override
     public int compare(MergedAnomalyResultDTO o1, MergedAnomalyResultDTO o2) {
-      // earlier for start time
+      // first order anomalies from earliest startTime to latest
       int res = Long.compare(o1.getStartTime(), o2.getStartTime());
       if (res != 0) return res;
 
-      // later for end time
-      res = Long.compare(o2.getEndTime(), o1.getEndTime());
+      // order anomalies from earliest startTime to latest, if startTime are 
the same

Review comment:
       Good catch, thx!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to