jihaozh 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_r268335170
########## 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: right, now I think of it, in this case, should we use the value stored in the anomaly instead? ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org