masteryhx commented on code in PR #26451: URL: https://github.com/apache/flink/pull/26451#discussion_r2044372615
########## flink-core/src/main/java/org/apache/flink/util/TimeUtils.java: ########## @@ -77,7 +79,14 @@ public static Duration parseDuration(String text) { final String unitLabel = trimmed.substring(pos).trim().toLowerCase(Locale.US); if (number.isEmpty()) { - throw new NumberFormatException("text does not start with a number"); + try { + // Fall back to parse ISO-8601 duration format + return Duration.parse(trimmed); Review Comment: Yeah, before format is not affected, but new format supports negative. How about also throwning an exception if it's a negative duration ? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org