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 2019/08/26 23:48:54 UTC

[GitHub] [incubator-pinot] xiaohui-sun commented on a change in pull request #4565: [TE] Merger fix to consider anomalies generated earlier

xiaohui-sun commented on a change in pull request #4565: [TE] Merger fix to consider anomalies generated earlier
URL: https://github.com/apache/incubator-pinot/pull/4565#discussion_r317842686
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/MergeWrapper.java
 ##########
 @@ -63,10 +63,14 @@
   protected static final Comparator<MergedAnomalyResultDTO> COMPARATOR = new Comparator<MergedAnomalyResultDTO>() {
     @Override
     public int compare(MergedAnomalyResultDTO o1, MergedAnomalyResultDTO o2) {
-      // earlier
+      // earlier for start time
       int res = Long.compare(o1.getStartTime(), o2.getStartTime());
       if (res != 0) return res;
 
+      // later for end time
+      res = Long.compare(o2.getStartTime(), o1.getStartTime());
 
 Review comment:
   Good catch! fixed it.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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