mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
11 lines
435 B
Plaintext
11 lines
435 B
Plaintext
-- { echo }
|
|
|
|
-- Aggregate function 'sum' allows overflow with two's complement arithmetics.
|
|
-- This contradicts the standard SQL semantic and we are totally fine with it.
|
|
SELECT sum(-8000000000000000000) FROM numbers(11);
|
|
4233720368547758080
|
|
SELECT sum(-8000000000000000000) FROM remote('127.0.0.{1,2,3,4,5,6,7,8,9,10,11}', system.one);
|
|
4233720368547758080
|
|
SELECT sumKahan(-8000000000000000000) FROM numbers(11);
|
|
-88000000000000000000
|