You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Gopalakrishnan (JIRA)" <ji...@apache.org> on 2017/09/20 10:25:00 UTC

[jira] [Comment Edited] (HIVE-9385) Sum a Double using an ORC table

    [ 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:24 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
 
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 is 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)