cloud-fan commented on a change in pull request #24619: [SPARK-27735][SS]Parsing interval string should be case-insensitive in SS URL: https://github.com/apache/spark/pull/24619#discussion_r284507595
########## File path: common/unsafe/src/main/java/org/apache/spark/unsafe/types/CalendarInterval.java ########## @@ -87,6 +92,26 @@ public static CalendarInterval fromString(String s) { } } + /** + * Convert a string to CalendarInterval. Unlike fromString, this method is case-insensitive and + * will throw IllegalArgumentException when the input string is not a valid interval. + * + * @throws IllegalArgumentException if the string is not a valid internal. + */ + public static CalendarInterval fromCaseInsensitiveString(String s) { Review comment: I'm ok with it, but eventually we should just use the parser, instead of reimplementing the parsing stuff. ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org