[
https://issues.apache.org/jira/browse/HIVE-4931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Remus Rusanu updated HIVE-4931:
-------------------------------
Fix Version/s: vectorization-branch
Status: Patch Available (was: Open)
The agg templates were incorrectly checking for isNull[0] in addition of
hasNulls for repeating values. I also discovered that the MIN/MAX aggregate was
using hard-coded comparison instead of templatized <Operand> for this case.
These are the results with the patch applied:
select max(ctinyint), max(csmallint), max(cint), max(cbigint), max(cfloat),
max(cdouble) from alltypes_orc;
rowmode
62 16379 1073737829 2146661184 62.0 16376.0
vect:
62 16379 1073737829 2146661184 62.0 16376.0
select min(ctinyint), min(csmallint), min(cint), min(cbigint), min(cfloat),
min(cdouble) from alltypes_orc;
rowmode:
-64 -16381 -1073517051 -2147049514 -64.0 -16376.0
vect:
-64 -16381 -1073517051 -2147049514 -64.0 -16376.0
select avg(ctinyint), avg(csmallint), avg(cint), avg(cbigint), avg(cfloat),
avg(cdouble) from alltypes_orc;
rowmode:
2.522511719175842 -415.2897318508829 -1.0994357654011336E8
1.9003309384238064E7 -2.2073250490516676 -2877.6021364726403
vect:
2.522511719175842 -415.2897318508829 -1.0994357654011336E8
1.9003309384238064E7 -2.2073250490516676 -2877.6021364726403
select stddev(ctinyint), stddev(csmallint), stddev(cint), stddev(cbigint),
stddev(cfloat), stddev(cdouble) from alltypes_orc;
rowmode:
34.52579284952266 8956.673250179136 6.765972128417507E8
1.0284485805202962E9 38.5241575060334 10107.644590369582
vect:
34.52579284952266 8956.673250179136 6.765972128417507E8
1.0284485805202962E9 38.5241575060334 10107.644590369582
> MAX/MIN aggregates yield incorrect results
> ------------------------------------------
>
> Key: HIVE-4931
> URL: https://issues.apache.org/jira/browse/HIVE-4931
> Project: Hive
> Issue Type: Sub-task
> Components: Query Processor
> Affects Versions: vectorization-branch
> Reporter: Remus Rusanu
> Assignee: Remus Rusanu
> Priority: Minor
> Fix For: vectorization-branch
>
> Attachments: HIVE-4931.1.patch
>
>
> With the dataset attached by Tony, running:
>
> select max(ctinyint), max(csmallint), max(cint), max(cbigint), max(cfloat),
> max(cdouble) from alltypes_orc;
>
> this is the result in rowmode:
> OK
> 62 16379 1073737829 2146661184 62.0 16376.0
>
> This is the result in vector mode:
> OK
> 1 16379 1071926788 -106115134 62.0 16361.0
--
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