You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/11/17 21:32:19 UTC

[GitHub] [incubator-pinot] vincentchenjl commented on a change in pull request #6269: [TE] fix changing createdTime of anomalies

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:
users@infra.apache.org



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