You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jitendra Nath Pandey (JIRA)" <ji...@apache.org> on 2014/03/14 08:24:42 UTC

[jira] [Updated] (HIVE-6664) Vectorized variance computation differs from row mode computation.

     [ https://issues.apache.org/jira/browse/HIVE-6664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jitendra Nath Pandey updated HIVE-6664:
---------------------------------------

    Attachment: HIVE-6664.1.patch

Attached patch fixes the issue.

> Vectorized variance computation differs from row mode computation.
> ------------------------------------------------------------------
>
>                 Key: HIVE-6664
>                 URL: https://issues.apache.org/jira/browse/HIVE-6664
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Jitendra Nath Pandey
>            Assignee: Jitendra Nath Pandey
>         Attachments: HIVE-6664.1.patch
>
>
> Following query can show the difference:
> select count(ss_sales_price), sum(ss_sales_price), avg(ss_sales_price), var_samp(ss_sales_price), var_pop(ss_sales_price), stddev_pop(ss_sales_price), stddev_samp(ss_sales_price) from store_sales
> The reason for the difference is that row mode converts the decimal value to double upfront to calculate sum of values. But the vector mode performs local aggregate sum as decimal and converts into double only at flush.



--
This message was sent by Atlassian JIRA
(v6.2#6252)