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



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/DateTimeFunctions.java
##########
@@ -273,9 +274,23 @@ public static String toDateTime(long millis, String 
pattern, String timezoneId)
    */
   @ScalarFunction
   public static long fromDateTime(String dateTimeString, String pattern) {
+    if (StringUtils.isEmpty(dateTimeString)) {

Review comment:
       I think it will throw NPE when `created_at` is `null`. My point is that 
we probably should not handle this in this general time handling function. The 
caller should catch the exception and fill the proper default value. The 
default value in the schema is not available to this function.




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

To unsubscribe, e-mail: [email protected]

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