You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Congling Xia (Jira)" <ji...@apache.org> on 2021/07/22 08:58:00 UTC

[jira] [Updated] (KYLIN-5042) floor function return wrong result for date type

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

Congling Xia updated KYLIN-5042:
--------------------------------
    Affects Version/s: v4.0.0-beta

> floor function return wrong result for date type
> ------------------------------------------------
>
>                 Key: KYLIN-5042
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5042
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v4.0.0-beta, v3.1.2
>            Reporter: Congling Xia
>            Priority: Major
>
> floor function return wrong result for date type, for example:
> {code:java}
> select 
>   floor(current_date to YEAR), 
>   floor(cast('2021-07-01' AS DATE) to YEAR), 
>   floor(cast('2021-07-01' AS TIMESTAMP) to YEAR)
> {code}
> the result is:
> {code:java}
> EXPR$0      EXPR$1      EXPR$2
> 1970-01-01  1970-01-01  2021-01-01 00:00:00
> {code}



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