[
https://issues.apache.org/jira/browse/HIVE-4686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13681309#comment-13681309
]
Remus Rusanu commented on HIVE-4686:
------------------------------------
Not sure about the 1.4999 vs. 0.1 in the comment, but here is the data:
in the txt file, using awk, I get:
[root@sandbox ~]# cat /tmp/data.txt | awk 'NR == 1 { max=$1; min=$1; sum=0 }
{ if ($1>max) max=$1; if ($1<min) min=$1; sum+=$1;}
END {printf "Min: %f\tMax: %f\tAverage: %f\tSum: %f\tNR: %d\n", min, max,
sum/NR, sum, NR}'
Min: 0.000000 Max: 0.100000 Average: 0.049999 Sum: 300057.330001
NR: 6001215
txt table:
select min(discount), max(discount), count(discount) from hive_4686_txt;
0.0 0.1 6001215 300057.3304087687
orc table:
0.0 0.1 6001215 300057.3304087687
vectorized orc, no patch:
0.0 0.0 63 -3.1554556579462614E-31
vectorized orc, patch applied:
0.0 0.1 6001215 300057.3304087687
Given that the patch gives the same results as txt, orc non-vectorized and awk
I assume the fix is correct. Perhaps the data is a different subset from what
you tested with, Tony?
> Max on float returning wrong results
> ------------------------------------
>
> Key: HIVE-4686
> URL: https://issues.apache.org/jira/browse/HIVE-4686
> Project: Hive
> Issue Type: Sub-task
> Affects Versions: vectorization-branch
> Reporter: Tony Murphy
> Assignee: Remus Rusanu
> Fix For: vectorization-branch
>
> Attachments: max_data.zip
>
>
> Text and Orc returning: 1.4499999
> Vectorized Orc Returning: 0.1
> {noformat}
> drop table LINEITEM_ORC;
> create external table LINEITEM_ORC(L_DISCOUNT float )
> ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
> STORED AS
> INPUTFORMAT
> 'org.apache.hadoop.hive.ql.io.orc.CommonOrcInputFormat'
> OUTPUTFORMAT
> 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat';
> {noformat}
> {noformat}
> SELECT max(l_discount)
> FROM LINEITEM_ORC
> {noformat}
--
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