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/04/24 18:29:45 UTC

[GitHub] [incubator-pinot] xiaohui-sun commented on a change in pull request #4161: [TE] anomalies endpoint to work with new baseline provider

xiaohui-sun commented on a change in pull request #4161: [TE] anomalies endpoint to work with new baseline provider
URL: https://github.com/apache/incubator-pinot/pull/4161#discussion_r278261408
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/dashboard/resources/v2/AnomaliesResource.java
 ##########
 @@ -1130,10 +1130,17 @@ private AnomalyDetails constructAnomalyDetails(MergedAnomalyResultDTO anomaly, D
         .withStart(new DateTime(sliceAnomalyCurrent.getStart(), dataTimeZone).minus(offsets.getPreOffsetPeriod()).getMillis())
         .withEnd(new DateTime(sliceAnomalyCurrent.getEnd(), dataTimeZone).plus(offsets.getPostOffsetPeriod()).getMillis());
 
-    DataFrame dfCurrent = this.timeSeriesLoader.load(sliceViewCurrent);
     DataFrame dfBaseline = DetectionUtils.getBaselineTimeseries(anomaly, filters, metric.getId(), config, sliceViewCurrent.getStart(), sliceViewCurrent.getEnd(), this.loader, this.provider).getDataFrame();
-    DataFrame dfAligned = dfCurrent.renameSeries(COL_VALUE, COL_CURRENT).joinOuter(
-        dfBaseline.renameSeries(COL_VALUE, COL_BASELINE));
+    DataFrame dfAligned;
+    if (dfBaseline.contains(COL_CURRENT)) {
 
 Review comment:
   Can you add more comments what is the logic here?

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