mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Batch of tests
This commit is contained in:
parent
6e224c1ff7
commit
eb78c9f084
@ -12,3 +12,7 @@ SELECT transform(1, [2, 3], ['Яндекс', 'Google'], 'Остальные') AS
|
||||
SELECT transform(2, [2, 3], ['Яндекс', 'Google'], 'Остальные') AS title;
|
||||
SELECT transform(3, [2, 3], ['Яндекс', 'Google'], 'Остальные') AS title;
|
||||
SELECT transform(4, [2, 3], ['Яндекс', 'Google'], 'Остальные') AS title;
|
||||
SELECT transform('hello', 'wrong', 1); -- { serverError 43 }
|
||||
SELECT transform('hello', ['wrong'], 1); -- { serverError 43 }
|
||||
SELECT transform('hello', ['wrong'], [1]); -- { serverError 43 }
|
||||
SELECT transform(tuple(1), ['sdf'], [1]); -- { serverError 43 }
|
||||
|
@ -12,4 +12,6 @@ INSERT INTO endsWith_test values ('11', '22', '33'), ('a', 'a', 'bb'), ('abc', '
|
||||
SELECT COUNT() FROM endsWith_test WHERE endsWith(S1, S1);
|
||||
SELECT COUNT() FROM endsWith_test WHERE endsWith(S1, S2);
|
||||
SELECT COUNT() FROM endsWith_test WHERE endsWith(S2, S3);
|
||||
|
||||
SELECT endsWith([], 'str'); -- { serverError 43 }
|
||||
DROP TABLE endsWith_test;
|
||||
|
@ -2,3 +2,6 @@ SELECT timeSlot(toDateTime('2000-01-02 03:04:05', 'UTC'));
|
||||
SELECT timeSlots(toDateTime('2000-01-02 03:04:05', 'UTC'), toUInt32(10000));
|
||||
SELECT timeSlots(toDateTime('2000-01-02 03:04:05', 'UTC'), toUInt32(10000), 600);
|
||||
SELECT timeSlots(toDateTime('2000-01-02 03:04:05', 'UTC'), toUInt32(600), 30);
|
||||
SELECT timeSlots(toDateTime('2000-01-02 03:04:05', 'UTC'), 'wrong argument'); -- { serverError 43 }
|
||||
SELECT timeSlots(toDateTime('2000-01-02 03:04:05', 'UTC'), toUInt32(600), 'wrong argument'); -- { serverError 43 }
|
||||
SELECT timeSlots(toDateTime('2000-01-02 03:04:05', 'UTC'), toUInt32(600), 0); -- { serverError 44 }
|
7
dbms/tests/queries/0_stateless/00968_roundAge.reference
Normal file
7
dbms/tests/queries/0_stateless/00968_roundAge.reference
Normal file
@ -0,0 +1,7 @@
|
||||
0
|
||||
18
|
||||
25
|
||||
35
|
||||
45
|
||||
55
|
||||
55
|
7
dbms/tests/queries/0_stateless/00968_roundAge.sql
Normal file
7
dbms/tests/queries/0_stateless/00968_roundAge.sql
Normal file
@ -0,0 +1,7 @@
|
||||
SELECT roundAge(0);
|
||||
SELECT roundAge(18);
|
||||
SELECT roundAge(25);
|
||||
SELECT roundAge(35);
|
||||
SELECT roundAge(45);
|
||||
SELECT roundAge(55);
|
||||
SELECT roundAge(56);
|
16
dbms/tests/queries/0_stateless/00969_roundDuration.reference
Normal file
16
dbms/tests/queries/0_stateless/00969_roundDuration.reference
Normal file
@ -0,0 +1,16 @@
|
||||
0
|
||||
10
|
||||
30
|
||||
60
|
||||
120
|
||||
180
|
||||
240
|
||||
300
|
||||
600
|
||||
1200
|
||||
1800
|
||||
3600
|
||||
7200
|
||||
18000
|
||||
36000
|
||||
36000
|
16
dbms/tests/queries/0_stateless/00969_roundDuration.sql
Normal file
16
dbms/tests/queries/0_stateless/00969_roundDuration.sql
Normal file
@ -0,0 +1,16 @@
|
||||
SELECT roundDuration(0);
|
||||
SELECT roundDuration(10);
|
||||
SELECT roundDuration(30);
|
||||
SELECT roundDuration(60);
|
||||
SELECT roundDuration(120);
|
||||
SELECT roundDuration(180);
|
||||
SELECT roundDuration(240);
|
||||
SELECT roundDuration(300);
|
||||
SELECT roundDuration(600);
|
||||
SELECT roundDuration(1200);
|
||||
SELECT roundDuration(1800);
|
||||
SELECT roundDuration(3600);
|
||||
SELECT roundDuration(7200);
|
||||
SELECT roundDuration(18000);
|
||||
SELECT roundDuration(36000);
|
||||
SELECT roundDuration(37000);
|
@ -0,0 +1,4 @@
|
||||
SELECT substring('hello', []); -- { serverError 43 }
|
||||
SELECT substring('hello', 1, []); -- { serverError 43 }
|
||||
SELECT substring(materialize('hello'), -1, -1); -- { serverError 69 }
|
||||
SELECT substring(materialize('hello'), 0); -- { serverError 135 }
|
Loading…
Reference in New Issue
Block a user