Jackie-Jiang commented on a change in pull request #6719:
URL: https://github.com/apache/incubator-pinot/pull/6719#discussion_r620745364



##########
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:
       This follows the naming convention of other functions (e.g. 
`fromDateTime`, `fromEpochDays` etc.)
   We can add more util functions in the following PRs as needed. That should 
be very straight forward




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

Reply via email to