Details
-
Sub-task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.11.1, 1.12.0
-
None
Description
The precision in document and code of `INTERVAL DAY(p1) TO SECOND(p2)` are inconsistent. In doc:
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.
In code:
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}") }
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
Attachments
Issue Links
- is duplicated by
-
FLINK-19910 Table API & SQL Data Types Document error
- Open