dongjoon-hyun commented on a change in pull request #24472: [SPARK-27578][SQL] Support INTERVAL ... HOUR TO SECOND syntax URL: https://github.com/apache/spark/pull/24472#discussion_r288850939
########## File path: common/unsafe/src/main/java/org/apache/spark/unsafe/types/CalendarInterval.java ########## @@ -147,12 +147,12 @@ public static CalendarInterval fromDayTimeString(String s) throws IllegalArgumen } else { try { int sign = m.group(1) != null && m.group(1).equals("-") ? -1 : 1; - long days = toLongWithRange("day", m.group(2), 0, Integer.MAX_VALUE); - long hours = toLongWithRange("hour", m.group(3), 0, 23); - long minutes = toLongWithRange("minute", m.group(4), 0, 59); - long seconds = toLongWithRange("second", m.group(5), 0, 59); + long days = m.group(2) == null ? 0 : toLongWithRange("day", m.group(3), 0, Integer.MAX_VALUE); Review comment: After fixing this, please run `dev/lint-java` locally in order to make it sure. ---------------------------------------------------------------- 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