You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2006/11/06 19:09:42 UTC

[jira] Resolved: (DERBY-131) AVG precision is INTEGER instead of DOUBLE

     [ http://issues.apache.org/jira/browse/DERBY-131?page=all ]

Daniel John Debrunner resolved DERBY-131.
-----------------------------------------

    Resolution: Invalid

The documentation for AVG includes this paragraph which seems to cover everything:

"The resulting data type is the same as the expression on which it operates (it will never overflow). The following query, for example, returns the INTEGER 1, which might not be what you would expect:"


http://db.apache.org/derby/docs/dev/ref/rrefsqlj32693.html

> AVG precision is INTEGER instead of DOUBLE
> ------------------------------------------
>
>                 Key: DERBY-131
>                 URL: http://issues.apache.org/jira/browse/DERBY-131
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.1
>            Reporter: Rainer Gemulla
>
> The AVG aggregator returns an INTEGER value, if the data tyoe of the respective attribute is INTEGER. This is wrong, because the average of a set of integers is not always an integer, too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira