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/03/22 20:45:41 UTC

[GitHub] [incubator-pinot] akshayrai commented on a change in pull request #4003: [TE] Fix ArrayIndexOutOfBoundsException; Wrap replay endpoint and ret…

akshayrai commented on a change in pull request #4003: [TE] Fix ArrayIndexOutOfBoundsException; Wrap replay endpoint and ret…
URL: https://github.com/apache/incubator-pinot/pull/4003#discussion_r268333586
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/components/PercentageChangeRuleAnomalyFilter.java
 ##########
 @@ -67,6 +70,11 @@ public boolean isQualified(MergedAnomalyResultDTO anomaly) {
 
     Map<MetricSlice, DataFrame> aggregates =
         this.dataFetcher.fetchData(new InputDataSpec().withAggregateSlices(slices)).getAggregates();
+    if (aggregates.get(currentSlice).isEmpty() || aggregates.get(baselineSlice).isEmpty()) {
+      LOG.warn("Unable to fetch data for current or baseline slice for anomaly {}. start = {} end = {} filters = {}",
+          anomaly.getId(), anomaly.getStartTime(), anomaly.getEndTime(), me.getFilters());
+      return false;
 
 Review comment:
   Ideally, we shouldn't get this error. If we do get it, then displaying the anomaly can mislead the users. Returning true would mean that the anomaly passed the filter when in fact it didn't, right?

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