mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Merging #3721; Added a test
This commit is contained in:
parent
92bb4471df
commit
4a6c25e65d
53
dbms/tests/queries/0_stateless/00805_round_down.reference
Normal file
53
dbms/tests/queries/0_stateless/00805_round_down.reference
Normal file
@ -0,0 +1,53 @@
|
||||
0 0
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
6 5
|
||||
7 5
|
||||
8 5
|
||||
9 5
|
||||
0 -1.5
|
||||
1 -1.5
|
||||
2 -1.5
|
||||
3 2.718281828459045
|
||||
4 3.141592653589793
|
||||
5 3.141592653589793
|
||||
6 5.5
|
||||
7 5.5
|
||||
8 5.5
|
||||
9 5.5
|
||||
0 2.718281828459045
|
||||
1 2.718281828459045
|
||||
2 2.718281828459045
|
||||
3 2.718281828459045
|
||||
4 3.141592653589793
|
||||
5 3.141592653589793
|
||||
6 3.141592653589793
|
||||
7 3.141592653589793
|
||||
8 3.141592653589793
|
||||
9 3.141592653589793
|
||||
0 4
|
||||
1 4
|
||||
2 4
|
||||
3 4
|
||||
4 4
|
||||
5 5
|
||||
6 6
|
||||
7 6
|
||||
8 6
|
||||
9 6
|
||||
1 4
|
||||
1 1
|
||||
1 1.5
|
||||
0 0
|
||||
1 0
|
||||
2 1.25
|
||||
3 2.5
|
||||
4 3.75
|
||||
5 5
|
||||
6 5
|
||||
7 6.25
|
||||
8 7.5
|
||||
9 8.75
|
14
dbms/tests/queries/0_stateless/00805_round_down.sql
Normal file
14
dbms/tests/queries/0_stateless/00805_round_down.sql
Normal file
@ -0,0 +1,14 @@
|
||||
SELECT number as x, roundDown(x, [0, 1, 2, 3, 4, 5]) FROM system.numbers LIMIT 10;
|
||||
SELECT toUInt8(number) as x, roundDown(x, [-1.5, e(), pi(), 5.5]) FROM system.numbers LIMIT 10;
|
||||
SELECT toInt32(number) as x, roundDown(x, [e(), pi(), pi(), e()]) FROM system.numbers LIMIT 10;
|
||||
SELECT number as x, roundDown(x, [6, 5, 4]) FROM system.numbers LIMIT 10;
|
||||
SELECT 1 as x, roundDown(x, [6, 5, 4]);
|
||||
|
||||
SET send_logs_level = 'none';
|
||||
SELECT 1 as x, roundDown(x, []); -- { serverError 43 }
|
||||
SELECT 1 as x, roundDown(x, emptyArrayUInt8()); -- { serverError 44 }
|
||||
|
||||
SELECT 1 as x, roundDown(x, [1]);
|
||||
SELECT 1 as x, roundDown(x, [1.5]);
|
||||
|
||||
SELECT number % 10 as x, roundDown(x, (SELECT groupArray(number * 1.25) FROM numbers(100000))) FROM system.numbers LIMIT 10;
|
Loading…
Reference in New Issue
Block a user