Robert Stupp created CASSANDRA-9674:
---------------------------------------
Summary: Reevaluate size of result/accumulator types of built in
sum()+avg() functions
Key: CASSANDRA-9674
URL: https://issues.apache.org/jira/browse/CASSANDRA-9674
Project: Cassandra
Issue Type: Improvement
Reporter: Robert Stupp
Fix For: 2.2.x
I'd like to propose to enlarge the accumulator and result type. Reason is
simply that an integer overflow is likely to occur especially for these
"narrow" types. Even just the {{sum()}} of just two {{tinyint}} of {{100}}
would return {{-56}}, which is just wrong.
Probably like
[this|http://www.postgresql.org/docs/9.1/static/functions-aggregate.html].
If we decide to do so, we should do it in 2.2.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)