[ 
https://issues.apache.org/jira/browse/IMPALA-10400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17252563#comment-17252563
 ] 

Sheng Wang commented on IMPALA-10400:
-------------------------------------

Hi [~stigahuang], please also take a look at this question, thanks!

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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to