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] [Reopened] (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 reopened KYLIN-5042:
---------------------------------

After testing on the latest versions of calcite. I find that the bug is fixed for calcite version ≥1.23.0. This bug is also existing in Kylin 4. I'll create new issue for that. 

Is there any plan to update the Kylin fork of Apache Calcite?


> 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: 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)