sutao bian created HIVE-4536:
--------------------------------
Summary: INSERT OVERWRITE LOCAL DIRECTORY sum() function will
write error result to local file
Key: HIVE-4536
URL: https://issues.apache.org/jira/browse/HIVE-4536
Project: Hive
Issue Type: Bug
Affects Versions: 0.8.1
Reporter: sutao bian
When i use insert overwrite local directory to sum, it will write a error
result
729.4000000000001 . the correct result is 729.4.
sometimes it will write correct result ,sometimes it write erro result.
hive -S -e " INSERT OVERWRITE LOCAL DIRECTORY '/opt/data/data1' select
concat(year,'-',month,'-',day),flog_appid,case when flog_country ='null' then
'UNKNOW' else flog_country end,string(sum(flog_expense)) from
tbl_ad_finance_log where year='${YEAR}' and month='${MONTH}' and day='${DAY}'
group by flog_appid,case when flog_country ='null' then 'UNKNOW' else
flog_country end,concat(year,'-',month,'-',day)"
2013-05-09^A72665@5136b689dc317bc003000003^AIN^A729.4000000000001
hive -S -e " INSERT OVERWRITE LOCAL DIRECTORY '/opt/data/data2' select
concat(year,'-',month,'-',day),flog_appid,case when flog_country ='null' then
'UNKNOW' else flog_country end,string(sum(flog_expense)) from
tbl_ad_finance_log where year='${YEAR}' and month='${MONTH}' and day='${DAY}'
group by flog_appid,case when flog_country ='null' then 'UNKNOW' else
flog_country end,concat(year,'-',month,'-',day)"
2013-05-09^A72665@5136b689dc317bc003000003^AIN^A729.4
Thanks in advance.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira