[ 
https://issues.apache.org/jira/browse/FLINK-35820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xintong Song updated FLINK-35820:
---------------------------------
    Fix Version/s:     (was: 2.0.0)

> Converting Duration to String fails for big values
> --------------------------------------------------
>
>                 Key: FLINK-35820
>                 URL: https://issues.apache.org/jira/browse/FLINK-35820
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Core
>    Affects Versions: 1.19.1
>            Reporter: Dawid Wysakowicz
>            Assignee: Dawid Wysakowicz
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.0-preview
>
>
> We support {{ConfigOption}} with {{Duration}} type. The {{Configuration}} 
> class can read/write {{Duration}} from/to {{String}}. Unfortunately the 
> conversion fails for values that do not fit into {{long}} after conversion to 
> nanos.
> E.g.
> {code}
>         final ConfigOption<Duration> option = ConfigOptions
>                 .key("duration")
>                 .durationType()
>                 .noDefaultValue();
>         final Configuration config = new Configuration();
>         config.set(option, Duration.ofMillis(Long.MAX_VALUE));
>         config.toFileWritableMap();
> {code}
> fails with {{java.lang.ArithmeticException: long overflow}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to