You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Konstantin Knauf (Jira)" <ji...@apache.org> on 2021/07/29 07:38:12 UTC

[jira] [Updated] (FLINK-18611) Include `m` as time unit expression for MINUTE in SQL

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

Konstantin Knauf updated FLINK-18611:
-------------------------------------
      Labels:   (was: auto-closed)
    Priority: Not a Priority  (was: Minor)

> Include `m` as time unit expression for MINUTE in SQL
> -----------------------------------------------------
>
>                 Key: FLINK-18611
>                 URL: https://issues.apache.org/jira/browse/FLINK-18611
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / FileSystem
>    Affects Versions: 1.11.0
>            Reporter: Q Kang
>            Priority: Not a Priority
>
> According to the documentation of FileSystem SQL Connector, if we try to create a table with the following parameter:
> {code:java}
> 'sink.partition-commit.delay'='1 m'
> {code}
> The program will fail with exception messages as below:
> {code:java}
> java.lang.IllegalArgumentException: Could not parse value '1 m' for key 'sink.partition-commit.delay'.java.lang.IllegalArgumentException: Could not parse value '1 m' for key 'sink.partition-commit.delay'. 
> ..........
> Caused by: java.lang.IllegalArgumentException: Time interval unit label 'm' does not match any of the recognized units: DAYS: (d | day | days), HOURS: (h | hour | hours), MINUTES: (min | minute | minutes), SECONDS: (s | sec | secs | second | seconds), MILLISECONDS: (ms | milli | millis | millisecond | milliseconds), MICROSECONDS: (µs | micro | micros | microsecond | microseconds), NANOSECONDS: (ns | nano | nanos | nanosecond | nanoseconds){code}
> In org/apache/flink/util/TimeUtils.java#TimeUnit, the definition of MINUTE seems do not agree with other units.
> {code:java}
> DAYS(ChronoUnit.DAYS, singular("d"), plural("day")),
> HOURS(ChronoUnit.HOURS, singular("h"), plural("hour")),
> MINUTES(ChronoUnit.MINUTES, singular("min"), plural("minute")),
> SECONDS(ChronoUnit.SECONDS, singular("s"), plural("sec"), plural("second")),
> ...{code}
> That is, `m` is not a valid expression for MINUTE, but `d`/`h`/`s` etc. are all valid expressions regarding to DAY/HOUR/SECOND, which might be a little confusing to users.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)