kfaraz commented on code in PR #18477:
URL: https://github.com/apache/druid/pull/18477#discussion_r2320811376


##########
processing/src/main/java/org/apache/druid/java/util/common/Intervals.java:
##########
@@ -53,6 +57,46 @@ public static Interval of(String format, Object... 
formatArgs)
     return of(StringUtils.format(format, formatArgs));
   }
 
+  /**
+   * @return Null if cannot parse with optimized strategy, else return the 
Interval.

Review Comment:
   For what kind of interval strings does this method return null?
   
   Is there a simpler way to short circuit in those cases rather than trying 
the parse unnecessarily?\
   Maybe a `canDeserializeOptimally()` method which checks it upfront? (Perhaps 
just check if there is `P` in there 😛 )



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