npawar commented on a change in pull request #5324:
URL: https://github.com/apache/incubator-pinot/pull/5324#discussion_r419717201



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/data/function/DateTimeFunctions.java
##########
@@ -35,9 +63,79 @@ static Long toEpochHours(Long millis) {
   }
 
   /**
-   * Convert epoch millis to epoch minutes, bucketed by given bucket 
granularity
+   * Convert epoch millis to epoch hours, bucketed by given bucket granularity
    */
-  static Long toEpochMinutes(Long millis, String bucket) {
-    return TimeUnit.MILLISECONDS.toMinutes(millis) / Integer.parseInt(bucket);
+  static Long toEpochHoursBucket(Long millis, String bucket) {

Review comment:
       As per our offline conversation, we now have toEpochXXX, 
toEpochXXXRounded, toEpochXXXBucket. For example,
   1) toEpochSeconds(millis) - converts from millis to  epoch seconds
   2) toEpochSecondsRounded (millis, 10) - converts from millis to epoch 
seconds, and rounds to the smaller 10th value i.e. (seconds/10) * 10
   3) toEpochSecondsBucket(millis, 10) - converts from millis to epoch seconds 
and divides by bucket, to get tenSecondsFromEpoch i.e. seconds / 10




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to