Avi Kivity
0bde5906b3
Merge "cql3: detect and handle int overflow in aggregate functions #5537 " from Benny
...
"
Fix overflow handling in sum() and avg().
sum:
- aggregated into __int128
- detect overflow when computing result and log a warning if found
avg:
- fix division function to divide the accumulator type _sum (__int128 for integers) by _count
Add unit tests for both cases
Test:
- manual test against Cassandra 3.11.3 to make sure the results in the scylla unit test agree with it.
- unit(dev), cql_query_test(debug)
Fixes #5536
"
* 'cql3-sum-overflow' of https://github.com/bhalevy/scylla :
test: cql_query_test: test avg overflow
cql3: functions: protect against int overflow in avg
test: cql_query_test: test sum overflow
cql3: functions: detect and handle int overflow in sum
exceptions: sort exception_code definitions
exceptions: define additional cassandra CQL exceptions codes
2020-01-08 10:39:38 +02:00
..
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-17 23:04:36 +02:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2020-01-05 16:13:58 +02:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2020-01-08 09:50:50 +02:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2020-01-05 17:20:31 +02:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2020-01-05 14:39:23 +02:00
2019-12-17 17:32:18 +02:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-31 19:23:42 +02:00
2020-01-07 22:14:50 -08:00
2020-01-03 15:48:20 +02:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00
2019-12-16 17:47:42 +03:00