mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
tests: added tests for sumWithOverflow(x) preserving input type
This commit is contained in:
parent
c0458999f9
commit
ee22253857
@ -0,0 +1,6 @@
|
||||
UInt64
|
||||
UInt16
|
||||
Float64
|
||||
Float32
|
||||
4950
|
||||
4950
|
7
dbms/tests/queries/0_stateless/00507_sumwithoverflow.sql
Normal file
7
dbms/tests/queries/0_stateless/00507_sumwithoverflow.sql
Normal file
@ -0,0 +1,7 @@
|
||||
SELECT toTypeName(sum(n)) FROM (SELECT toUInt16(number) AS n FROM system.numbers LIMIT 100);
|
||||
SELECT toTypeName(sumWithOverflow(n)) FROM (SELECT toUInt16(number) AS n FROM system.numbers LIMIT 100);
|
||||
SELECT toTypeName(sum(n)) FROM (SELECT toFloat32(number) AS n FROM system.numbers LIMIT 100);
|
||||
SELECT toTypeName(sumWithOverflow(n)) FROM (SELECT toFloat32(number) AS n FROM system.numbers LIMIT 100);
|
||||
|
||||
SELECT sum(n) FROM (SELECT toUInt16(number) AS n FROM system.numbers LIMIT 100);
|
||||
SELECT sumWithOverflow(n) FROM (SELECT toUInt16(number) AS n FROM system.numbers LIMIT 100);
|
Loading…
Reference in New Issue
Block a user