You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Mark Struberg (Jira)" <ji...@apache.org> on 2021/04/06 20:29:00 UTC

[jira] [Created] (OPENJPA-2862) select SUM doesn't return spec defined types

Mark Struberg created OPENJPA-2862:
--------------------------------------

             Summary: select SUM doesn't return spec defined types
                 Key: OPENJPA-2862
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2862
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 3.1.2
            Reporter: Mark Struberg
            Assignee: Mark Struberg
             Fix For: 3.1.3


As per spec section 4.8.5 Aggregate Functions in the SELECT Clause we  need to handle a few types in a special way

{noformat}
SUM returns Long when applied to state fields of integral types (other than BigInteger); Dou- ble when applied to state fields of floating point types; BigInteger when applied to state fields of type BigInteger; and BigDecimal when applied to state fields of type BigDecimal.
{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)