xiaohui-sun commented on a change in pull request #4566: [TE] fix multi-day 
granularity alignment issue
URL: https://github.com/apache/incubator-pinot/pull/4566#discussion_r317841244
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DefaultDataProvider.java
 ##########
 @@ -373,7 +373,8 @@ private MetricSlice alignSlice(MetricSlice slice) {
     }
 
     // align to time buckets and request time zone
-    long timeGranularity = granularity.toMillis();
+    // if granularity is more than 1 day, align to the daily boundary
+    long timeGranularity = Math.min(granularity.toMillis(), 
TimeUnit.DAYS.toMillis(1));
 
 Review comment:
   Let's add more comments why it aligns to the daily boundary.

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

Reply via email to