hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Polaert <gpola...@cyres.fr>
Subject Trouble with sum function
Date Mon, 11 Jun 2012 09:49:40 GMT
Hi,

We're expecting some issue with the sum function in Hive 0.7.1.
The precision of float number isn't correct (0.320484484676 instead of 0.32)
We aren't expecting this error with double format.

For instance, "select id, sum(col1), sum(col2) from test_table group by id" returns incorrect
values.

------
CREATE TABLE test_table  ( id int,  col1 double,  col2 float )
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\073'
LINES TERMINATED BY '\n'
STORED AS TEXTFILE;

LOAD DATA INPATH '/user/hive/xxxxx/import.csv' INTO TABLE `test _table`

Import.csv
1;1.012;1.012
2;2.1;2.1
3;3.2;3.2
4;4.323;4.323
5;5;5
----

Is it a bug  ? Or maybe did we make a error ?


Guillaume Polaert | Cyr├Ęs Conseil 


Mime
View raw message