phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Prus (JIRA)" <>
Subject [jira] [Created] (PHOENIX-4564) AVG function always returns BigDecimal
Date Mon, 29 Jan 2018 10:34:00 GMT
Vladimir Prus created PHOENIX-4564:

             Summary: AVG function always returns BigDecimal
                 Key: PHOENIX-4564
             Project: Phoenix
          Issue Type: Bug
            Reporter: Vladimir Prus

Per documentation for 'AVG' function:

The average (mean) value. If no rows are selected, the result is {{NULL}}. Aggregates are
only allowed in select statements. The returned value is of the same data type as the parameter.

However, the code at


actually returns BigDecimal, no matter what. That is inconsistent with documentation, and
user expectations, and I'm not sure what benefits it brings. Say, in Hive 'avg' does return
the same type as the expression, and it works fine. 

This message was sent by Atlassian JIRA

View raw message