You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/05/16 01:19:51 UTC

[GitHub] [druid] suneet-s commented on a change in pull request #9877: Number based columns representing time in custom format cannot be used as timestamp column in Druid.

suneet-s commented on a change in pull request #9877:
URL: https://github.com/apache/druid/pull/9877#discussion_r426103116



##########
File path: core/src/main/java/org/apache/druid/java/util/common/parsers/TimestampParser.java
##########
@@ -126,14 +126,24 @@
     return o -> {
       Preconditions.checkNotNull(o, "null timestamp");
 
-      if (o instanceof Number) {
+      if (o instanceof Number && isNumericFormat(format)) {

Review comment:
       `isNumericFormat(format)` does not need to be computed for each object. You can compute this outside the function that is applied per object (on line 125)




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org