Avi Kivity
d57395dce9
cql: prevent overflow when computing averages
...
Currently, we use type type of the column as the accumulator when we
average it. This can easily overflow, e.g. (2^31-1)+(3) = overflow.
Fix by using __int128 for the accumulator. It's not standard, but
it's way more efficient and simpler than the alternatives.
Inspired by CASSANDRA-12417, but much simpler due to the availability
of __int128.
Message-Id: <20171112173529.30764-1-avi@scylladb.com >
2017-11-13 08:53:59 +01:00
..
2017-11-13 08:53:59 +01:00
2017-11-03 09:10:43 +02:00
2017-10-07 21:04:40 +02:00
2017-11-03 10:12:58 +02:00
2017-08-22 15:06:18 +03:00
2016-04-08 08:12:47 +03:00
2016-04-08 08:12:47 +03:00
2017-07-27 09:39:58 +03:00
2016-04-08 08:12:47 +03:00
2016-04-08 08:12:47 +03:00
2016-04-08 08:12:47 +03:00
2017-08-10 15:01:10 -04:00
2016-04-08 08:12:47 +03:00
2017-07-19 09:52:15 +02:00
2017-05-04 14:59:11 +03:00
2016-05-16 14:13:31 +03:00
2016-05-16 14:13:31 +03:00
2017-09-03 11:07:27 +03:00
2017-08-10 15:01:10 -04:00
2017-08-10 15:01:10 -04:00
2017-08-10 15:01:10 -04:00
2017-05-21 12:26:15 +03:00
2017-10-07 21:04:40 +02:00
2017-07-01 12:13:44 +03:00
2017-06-29 10:51:20 +02:00
2016-04-08 08:12:47 +03:00
2016-04-08 08:12:47 +03:00
2016-04-08 08:12:47 +03:00
2017-05-21 12:26:15 +03:00
2017-05-04 15:59:50 +02:00
2017-05-04 15:59:50 +02:00
2017-05-04 15:59:50 +02:00
2017-05-04 15:59:50 +02:00
2016-12-20 13:06:11 +00:00
2017-02-22 09:19:46 +00:00
2017-07-02 20:06:50 +02:00
2017-07-02 20:06:50 +02:00
2016-10-06 15:42:37 +03:00
2017-11-03 09:10:43 +02:00
2017-10-05 15:29:51 +01:00
2016-04-08 08:12:47 +03:00
2017-07-13 14:02:11 +03:00
2017-07-13 14:02:11 +03:00
2017-10-21 13:53:03 -04:00
2017-10-21 13:53:03 -04:00
2016-04-08 08:12:47 +03:00
2016-12-20 13:06:11 +00:00
2017-04-24 10:40:12 +03:00
2017-04-24 10:40:12 +03:00
2017-05-04 15:59:50 +02:00
2017-05-04 15:59:50 +02:00
2017-07-11 11:30:49 +02:00
2017-08-10 15:01:10 -04:00
2017-01-20 13:19:00 +02:00
2017-01-26 13:50:04 +02:00
2017-04-17 23:03:15 +03:00
2016-12-20 13:06:11 +00:00
2017-07-26 19:28:35 +03:00
2016-04-08 08:12:47 +03:00
2017-09-18 15:15:15 +02:00
2017-09-18 15:15:15 +02:00
2017-05-04 15:59:50 +02:00
2017-05-04 15:59:50 +02:00
2016-04-11 09:10:41 +00:00
2016-04-11 09:10:41 +00:00
2017-01-27 09:24:36 +02:00
2017-01-26 13:50:04 +02:00
2016-04-08 08:12:47 +03:00
2016-04-08 08:12:47 +03:00
2017-07-01 12:13:44 +03:00
2017-01-30 10:49:31 +02:00
2017-05-10 12:38:18 +03:00
2017-05-10 12:38:18 +03:00