siddharthteotia commented on a change in pull request #6719: URL: https://github.com/apache/incubator-pinot/pull/6719#discussion_r620655228
########## File path: pinot-common/src/main/java/org/apache/pinot/common/function/scalar/DateTimeFunctions.java ########## @@ -228,6 +229,22 @@ public static long fromEpochDaysBucket(long days, long bucket) { return TimeUnit.DAYS.toMillis(days * bucket); } + /** + * Converts epoch millis to Timestamp + */ + @ScalarFunction + public static Timestamp toTimestamp(long millis) { + return new Timestamp(millis); + } + + /** + * Converts Timestamp to epoch millis + */ + @ScalarFunction + public static long fromTimestamp(Timestamp timestamp) { Review comment: (nit) consider naming it fromTimestampToMillisSinceEpoch or something like that ? -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org