npawar commented on a change in pull request #5326: URL: https://github.com/apache/incubator-pinot/pull/5326#discussion_r419603427
########## File path: pinot-core/src/main/java/org/apache/pinot/core/data/function/DateTimeFunctions.java ########## @@ -40,4 +47,14 @@ static Long toEpochHours(Long millis) { static Long toEpochMinutes(Long millis, String bucket) { return TimeUnit.MILLISECONDS.toMinutes(millis) / Integer.parseInt(bucket); } + + DateTime toDateTime(String dateTimeString, String pattern) { + if (!_dateTimeFormatterMap.containsKey(pattern)) { + _dateTimeFormatterMap.put(pattern, DateTimeFormat.forPattern(pattern)); + } + + DateTimeFormatter dateTimeFormatter = _dateTimeFormatterMap.get(pattern); + + return dateTimeFormatter.parseDateTime(dateTimeString); Review comment: I guess this answers your question about fromDateTime? ---------------------------------------------------------------- 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