metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kaspersorensen <...@git.apache.org>
Subject [GitHub] metamodel issue #128: Demonstrated issue with AVG function and fixed/adapted...
Date Thu, 02 Nov 2017 03:03:48 GMT
Github user kaspersorensen commented on the issue:

    https://github.com/apache/metamodel/pull/128
  
    I'm not saying that I want to return a BigDecimal. Rather I'm saying that the test isn't
correct in my opinion. Rounding a double down to the nearest integer is doable when wanted.
But the other direction isn't possible. So in my opinion the more natural data type to return
is a double (or some other decimal type). I guess with my example of `199/100 == 1`, I'm simply
arguing that it's silly to return the same data type. Which is why I guess e.g. MongoDB also
returns a double. I haven't researched other databases yet, but I suspect that this aspect
of SQL is something that isn't generally appreciated or consistently implemented because it
seems so odd.


---

Mime
View raw message