[ 
https://issues.apache.org/jira/browse/FLINK-19913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17225531#comment-17225531
 ] 

Timo Walther commented on FLINK-19913:
--------------------------------------

The Blink planner has still problems with some types. Namely {INTERVAL} and 
{TIME} are not aligned with the new type system. I hope someone could finally 
address this. The documentation should be correct though and this is mentioned 
in the planner limitation section.

> 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: Improvement
>          Components: Table SQL / API
>    Affects Versions: 1.12.0, 1.11.1
>            Reporter: sunjincheng
>            Priority: Major
>
> 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