Add new regression tests

This commit is contained in:
Salvatore Mesoraca 2023-04-18 11:06:34 +02:00
parent 9ef9ec4aca
commit 0b52166deb
No known key found for this signature in database
GPG Key ID: 0567E50A25403074
2 changed files with 94 additions and 0 deletions

View 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

View 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;