Zakelly commented on code in PR #26451:
URL: https://github.com/apache/flink/pull/26451#discussion_r2044330959
##########
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:
It seems that the duration could be negative right? But before this it
shouldn't be. Is it a problem?
--
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]