hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gopalakrishnan (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-9385) Sum a Double using an ORC table
Date Wed, 20 Sep 2017 10:27:01 GMT

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

Gopalakrishnan edited comment on HIVE-9385 at 9/20/17 10:26 AM:
----------------------------------------------------------------

hi, 
we are getting the same issue in hive 1.2.1. 
My tables is orc table and partitioned. calculating sum on a double field is not giving accurate
value.
expected value is 2.7115388423211*4*E14 but sum value comes as 2.7115388423211*378*E14
 
instead 114 it comes as 11378.
I do not see any round off issue also, I have tried by typecasting it to decimal prior calculating
sum. but the getting incorrect result.

is this issue still exist in 1.2.1


was (Author: gopalakrishnan_selvaraj):
hi, 
we are getting the same issue in hive 1.2.1. 
My tables is orc table and partitioned. calculating sum on a double field is not giving accurate
value.
expected value is 2.7115388423211*4*E14 but sum value comes as 2.7115388423211*378*E14
 
I do not see any round off issue also, I have tried by typecasting it to decimal prior calculating
sum. but the getting incorrect result.

is this issue still exist in 1.2.1

> Sum a Double using an ORC table
> -------------------------------
>
>                 Key: HIVE-9385
>                 URL: https://issues.apache.org/jira/browse/HIVE-9385
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.13.1
>         Environment: HDP 2.x, Hive
>            Reporter: Nick Martin
>            Priority: Minor
>
> I’m storing a sales amount column as a double in an ORC table and when I do:
> {code:sql}
> select sum(x) from sometable
> {code}
> I get a value like {{4.79165141174808E9}}
> A visual inspection of the column values reveals no glaring anomalies…all looks pretty
normal. 
> If I do the same thing in a textfile table I get a perfectly fine aggregation of the
double field.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message