mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 19:45:11 +00:00
Add new regression tests
This commit is contained in:
parent
9ef9ec4aca
commit
0b52166deb
71
tests/queries/0_stateless/02542_transform_old.reference
Normal file
71
tests/queries/0_stateless/02542_transform_old.reference
Normal file
@ -0,0 +1,71 @@
|
||||
google
|
||||
yahoo
|
||||
yandex
|
||||
other
|
||||
#1
|
||||
20
|
||||
21
|
||||
22
|
||||
29
|
||||
#2
|
||||
0
|
||||
3
|
||||
5
|
||||
29
|
||||
1
|
||||
7
|
||||
9
|
||||
21
|
||||
20
|
||||
8
|
||||
#3
|
||||
20
|
||||
21
|
||||
22
|
||||
29
|
||||
#4
|
||||
google
|
||||
yahoo
|
||||
yandex
|
||||
other
|
||||
#5
|
||||
5
|
||||
3
|
||||
0
|
||||
7
|
||||
google
|
||||
1
|
||||
8
|
||||
yahoo
|
||||
9
|
||||
yandex
|
||||
----
|
||||
google
|
||||
yahoo
|
||||
yandex
|
||||
other
|
||||
#1
|
||||
20
|
||||
21
|
||||
22
|
||||
29
|
||||
#3
|
||||
20
|
||||
21
|
||||
22
|
||||
29
|
||||
#4
|
||||
google
|
||||
yahoo
|
||||
yandex
|
||||
other
|
||||
----
|
||||
2000
|
||||
2100
|
||||
2200
|
||||
2900
|
||||
#1
|
||||
2000
|
||||
2100
|
||||
2200
|
||||
2900
|
23
tests/queries/0_stateless/02542_transform_old.sql
Normal file
23
tests/queries/0_stateless/02542_transform_old.sql
Normal file
@ -0,0 +1,23 @@
|
||||
SELECT transform(number, [2, 4, 6], ['google', 'yandex', 'yahoo'], 'other') as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '#1';
|
||||
SELECT transform(number, [2, 4, 6], [29, 20, 21], 22) as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '#2';
|
||||
SELECT transform(number, [2, 4, 6], [29, 20, 21]) as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '#3';
|
||||
SELECT transform(toString(number), ['2', '4', '6'], [29, 20, 21], 22) as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '#4';
|
||||
SELECT transform(toString(number), ['2', '4', '6'], ['google', 'yandex', 'yahoo'], 'other') as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '#5';
|
||||
SELECT transform(toString(number), ['2', '4', '6'], ['google', 'yandex', 'yahoo']) as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '----';
|
||||
SELECT transform(number, [2, 4, 6], ['google', 'yandex', 'yahoo'], materialize('other')) as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '#1';
|
||||
SELECT transform(number, [2, 4, 6], [29, 20, 21], materialize(22)) as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '#3';
|
||||
SELECT transform(toString(number), ['2', '4', '6'], [29, 20, 21], materialize(22)) as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '#4';
|
||||
SELECT transform(toString(number), ['2', '4', '6'], ['google', 'yandex', 'yahoo'], materialize('other')) as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '----';
|
||||
SELECT transform(number, [2, 4, 6], [2900, 2000, 2100], 2200) as x FROM numbers(10) GROUP BY x;
|
||||
SELECT '#1';
|
||||
SELECT transform(number, [2, 4, 6], [2900, 2000, 2100], materialize(2200)) as x FROM numbers(10) GROUP BY x;
|
Loading…
Reference in New Issue
Block a user