[ 
https://issues.apache.org/jira/browse/TRAFODION-3284?focusedWorklogId=211343&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-211343
 ]

ASF GitHub Bot logged work on TRAFODION-3284:
---------------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Mar/19 22:03
            Start Date: 11/Mar/19 22:03
    Worklog Time Spent: 10m 
      Work Description: Traf-Jenkins commented on issue #1812: [TRAFODION-3284] 
Make overflow processing for float SUM consistent
URL: https://github.com/apache/trafodion/pull/1812#issuecomment-471754561
 
 
   Test Passed.  https://jenkins.esgyn.com/job/Check-PR-master/3160/
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 211343)
    Time Spent: 0.5h  (was: 20m)

> SUM aggregate overflow criteria are inconsistent with rest of product
> ---------------------------------------------------------------------
>
>                 Key: TRAFODION-3284
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3284
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The following script demonstrates the problem:
> {quote}drop table if exists t;
> create table t (
> c1 float,
> c2 double precision,
> c3 float,
> c4 double precision
> );
> insert into t values (-1.234, -1.234, -1.42085740198313120E-309, 
> -1.42085740198313120E-309);
> select * from t;
> select avg(c1) from t;
> select avg(c2) from t;
> select avg(c3) from t;
> select avg(c4) from t;
> select count(c1) from t;
> select count(c2) from t;
> select count(c3) from t;
> select count(c4) from t;
> select max(c1) from t;
> select max(c2) from t;
> select max(c3) from t;
> select max(c4) from t;
> select min(c1) from t;
> select min(c2) from t;
> select min(c3) from t;
> select min(c4) from t;
> select stddev(c1) from t;
> select stddev(c2) from t;
> select stddev(c3) from t;
> select stddev(c4) from t;
> select sum(c1) from t;
> select sum(c2) from t;
> select sum(c3) from t;
> select sum(c4) from t;
> select variance(c1) from t;
> select variance(c2) from t;
> select variance(c3) from t;
> select variance(c4) from t;
> {quote}
>  
> When run, the AVG, SUM, STDDEV and VARIANCE aggregates report error 8411 
> (floating point overflow) on columns C3 and C4. For STDDEV and VARIANCE this 
> is correct, since calculating these aggregates requires squaring the column 
> value. For SUM and AVG, we are merely summing the value, which should not 
> cause an overflow.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to