[jira] [Updated] (HIVE-5992) Hive inconsistently converts timestamp in AVG and SUM UDAF's
[ https://issues.apache.org/jira/browse/HIVE-5992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xuefu Zhang updated HIVE-5992: -- Resolution: Fixed Fix Version/s: 0.13.0 Status: Resolved (was: Patch Available) Patch committed to trunk. Thank Prasad for the review. > Hive inconsistently converts timestamp in AVG and SUM UDAF's > > > Key: HIVE-5992 > URL: https://issues.apache.org/jira/browse/HIVE-5992 > Project: Hive > Issue Type: Bug > Components: UDF >Affects Versions: 0.12.0 >Reporter: Xuefu Zhang >Assignee: Xuefu Zhang > Fix For: 0.13.0 > > Attachments: HIVE-5992.patch > > > {code} > hive> select t, sum(t), count(*), sum(t)/count(*), avg(t) from ts group by t; > ... > OK > 1977-03-15 12:34:22.345678 227306062 1 227306062 > 2.27306062345678E8 > {code} > As it can be seen, timestamp value (1977-03-15 12:34:22.345678) is converted > with fractional part ignored in sum, while preserved in avg. As a further > result, sum()/count() is not equivalent to avg. -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Updated] (HIVE-5992) Hive inconsistently converts timestamp in AVG and SUM UDAF's
[ https://issues.apache.org/jira/browse/HIVE-5992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xuefu Zhang updated HIVE-5992: -- Status: Patch Available (was: Open) > Hive inconsistently converts timestamp in AVG and SUM UDAF's > > > Key: HIVE-5992 > URL: https://issues.apache.org/jira/browse/HIVE-5992 > Project: Hive > Issue Type: Bug > Components: UDF >Affects Versions: 0.12.0 >Reporter: Xuefu Zhang >Assignee: Xuefu Zhang > Attachments: HIVE-5992.patch > > > {code} > hive> select t, sum(t), count(*), sum(t)/count(*), avg(t) from ts group by t; > ... > OK > 1977-03-15 12:34:22.345678 227306062 1 227306062 > 2.27306062345678E8 > {code} > As it can be seen, timestamp value (1977-03-15 12:34:22.345678) is converted > with fractional part ignored in sum, while preserved in avg. As a further > result, sum()/count() is not equivalent to avg. -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Updated] (HIVE-5992) Hive inconsistently converts timestamp in AVG and SUM UDAF's
[ https://issues.apache.org/jira/browse/HIVE-5992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xuefu Zhang updated HIVE-5992: -- Attachment: HIVE-5992.patch > Hive inconsistently converts timestamp in AVG and SUM UDAF's > > > Key: HIVE-5992 > URL: https://issues.apache.org/jira/browse/HIVE-5992 > Project: Hive > Issue Type: Bug > Components: UDF >Affects Versions: 0.12.0 >Reporter: Xuefu Zhang >Assignee: Xuefu Zhang > Attachments: HIVE-5992.patch > > > {code} > hive> select t, sum(t), count(*), sum(t)/count(*), avg(t) from ts group by t; > ... > OK > 1977-03-15 12:34:22.345678 227306062 1 227306062 > 2.27306062345678E8 > {code} > As it can be seen, timestamp value (1977-03-15 12:34:22.345678) is converted > with fractional part ignored in sum, while preserved in avg. As a further > result, sum()/count() is not equivalent to avg. -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Updated] (HIVE-5992) Hive inconsistently converts timestamp in AVG and SUM UDAF's
[ https://issues.apache.org/jira/browse/HIVE-5992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xuefu Zhang updated HIVE-5992: -- Component/s: UDF > Hive inconsistently converts timestamp in AVG and SUM UDAF's > > > Key: HIVE-5992 > URL: https://issues.apache.org/jira/browse/HIVE-5992 > Project: Hive > Issue Type: Bug > Components: UDF >Affects Versions: 0.12.0 >Reporter: Xuefu Zhang >Assignee: Xuefu Zhang > > {code} > hive> select t, sum(t), count(*), sum(t)/count(*), avg(t) from ts group by t; > ... > OK > 1977-03-15 12:34:22.345678 227306062 1 227306062 > 2.27306062345678E8 > {code} > As it can be seen, timestamp value (1977-03-15 12:34:22.345678) is converted > with fractional part ignored in sum, while preserved in avg. As a further > result, sum()/count() is not equivalent to avg. -- This message was sent by Atlassian JIRA (v6.1.4#6159)