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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]