You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Sheng Wang (Jira)" <ji...@apache.org> on 2020/12/30 11:27:00 UTC

[jira] [Closed] (IMPALA-10400) Floor/Ceil/Trunc should return BIGINT instead of DOUBLE

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

Sheng Wang closed IMPALA-10400.
-------------------------------
    Resolution: Not A Problem

> Floor/Ceil/Trunc should return BIGINT instead of DOUBLE
> -------------------------------------------------------
>
>                 Key: IMPALA-10400
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10400
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>            Reporter: Sheng Wang
>            Priority: Major
>
> Floor/Ceil/Trunc returns BIGINT in version 2.12.0, but change to DOUBLE in IMPALA-6230. I think these functions should use BIGINT as return value type instead of DOUBLE. We compared severals systems:
> *mysql*:
> floor(num): BIGINT
> ceil(num): BIGINT
> truncate(num, d): d>0 DOUBLE,d=0 BIGINT,d<0 0
> *hive 2.1.1*:
> floor(num): BIGINT
> ceil(num): BIGINT
> trunc(date, format): truncate date
> *clickhouse*:
> floor(num): BIGINT
> ceil(num): BIGINT
> truncate(num, [d]),d>0 DOUBLE,d=0 BIGINT,d<0 0
> *greenplum*:
> floor(num): BIGINT
> ceil(num): BIGINT
> truncate(num, [d]),d>0 DOUBLE,d=0 BIGINT,d<0 0
> *spark*:
> floor(num): BIGINT
> ceil(num): BIGINT
> trunc(date, format): truncate date



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