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

Q Kang updated FLINK-18611:
---------------------------
    Description: 
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.

 

  was:
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 doesn't match 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.

 


> 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: Minor
>
> 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)

Reply via email to