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

Jark Wu closed FLINK-28620.
---------------------------
    Fix Version/s:     (was: 1.18.0)
         Assignee:     (was: Jark Wu)
       Resolution: Cannot Reproduce

> SQL Client doesn't properly print values of INTERVAL type
> ---------------------------------------------------------
>
>                 Key: FLINK-28620
>                 URL: https://issues.apache.org/jira/browse/FLINK-28620
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Client
>            Reporter: Jark Wu
>            Priority: Major
>
> The display of values of interval type should follow the CAST rules. However, 
> currently, SQL Client prints it using {{Period.toString()}} and 
> {{Duration.toString()}} which is not SQL standard compliant. 
> {code}
> Flink SQL> select interval '9-11' year to month;
> +--------+
> | EXPR$0 |
> +--------+
> |  P119M |
> +--------+
> 1 row in set
> Flink SQL> select cast(interval '9-11' year to month as varchar);
> +--------+
> | EXPR$0 |
> +--------+
> |  +9-11 |
> +--------+
> 1 row in set
> Flink SQL> select interval '2 1:2:3' day to second;
> +-----------+
> |    EXPR$0 |
> +-----------+
> | PT49H2M3S |
> +-----------+
> 1 row in set
> Flink SQL> select cast(interval '2 1:2:3' day to second as varchar);
> +-----------------+
> |          EXPR$0 |
> +-----------------+
> | +2 01:02:03.000 |
> +-----------------+
> 1 row in set
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to