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

Timo Walther updated FLINK-19913:
---------------------------------
        Parent: FLINK-12251
    Issue Type: Sub-task  (was: Improvement)

> The precision in document and code of `INTERVAL DAY(p1) TO SECOND(p2)` are 
> inconsistent
> ---------------------------------------------------------------------------------------
>
>                 Key: FLINK-19913
>                 URL: https://issues.apache.org/jira/browse/FLINK-19913
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>    Affects Versions: 1.11.1, 1.12.0
>            Reporter: sunjincheng
>            Priority: Minor
>              Labels: auto-deprioritized-major, starter
>
> The precision in document and code of `INTERVAL DAY(p1) TO SECOND(p2)` are 
> inconsistent. In doc:
> {code:java}
> INTERVAL DAY(p1) TO SECOND(p2)
> The type can be declared using the above combinations where p1 is the number 
> of digits of days (day precision) and p2 is the number of digits of 
> fractional seconds (fractional precision). p1 must have a value between 1 and 
> 6 (both inclusive). p2 must have a value between 0 and 9 (both inclusive). If 
> no p1 is specified, it is equal to 2 by default. If no p2 is specified, it is 
> equal to 6 by default. 
> {code}
> In code:
> {code:java}
>  case typeName if DAY_INTERVAL_TYPES.contains(typeName) =>
>         if (relDataType.getPrecision > 3) {
>           throw new TableException(
>             s"DAY_INTERVAL_TYPES precision is not supported: 
> ${relDataType.getPrecision}")
>         }
> {code}
> BTW: We can also refer to Oracle's definition of support for INTERVAL:
>  
> [https://oracle-base.com/articles/misc/oracle-dates-timestamps-and-intervals#interval]



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

Reply via email to