phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas D'Silva (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-2536) Return of aggregation functions do not have the correct data type and precision
Date Tue, 08 Jan 2019 23:01:00 GMT

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

Thomas D'Silva updated PHOENIX-2536:
------------------------------------
    Fix Version/s:     (was: 4.15.0)

> Return of aggregation functions do not have the correct data type and precision
> -------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2536
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2536
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.6.0
>            Reporter: Kevin Liew
>            Assignee: Kevin Liew
>            Priority: Major
>              Labels: function, phoenix
>
> ANSI SQL specifies that 
> {quote}If SUM is specified and DT is exact numeric with scale
>               S, then the data type of the result is exact numeric with
>               implementation-defined precision and scale S.
> ...
> If DT is approximate numeric, then the data type of the
>               result is approximate numeric with implementation-defined
>               precision not less than the precision of DT.{quote}
> However, when summing integer types (first operand) with float or double (second operand),
Phoenix returns the value with the same data type as the first operand. 
> Doing a sum with the first operand being a FLOAT or DOUBLE will return a DECIMAL with
a fixed scale of 4. 
> Doing any multiplication or division will also result in a DECIMAL with scale 4.
> In all of the cases outlined above, the return data type does not meet the ANSI standard.



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

Mime
View raw message