mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
dbms: added test for function 'transform' [#METR-15987].
This commit is contained in:
parent
123cd3340d
commit
3f4f96ad7d
70
dbms/tests/queries/0_stateless/00153_transform.reference
Normal file
70
dbms/tests/queries/0_stateless/00153_transform.reference
Normal file
@ -0,0 +1,70 @@
|
||||
0
|
||||
1
|
||||
2
|
||||
111
|
||||
4
|
||||
222
|
||||
6
|
||||
333
|
||||
8
|
||||
9
|
||||
9999
|
||||
9999
|
||||
9999
|
||||
111
|
||||
9999
|
||||
222
|
||||
9999
|
||||
333
|
||||
9999
|
||||
9999
|
||||
|
||||
|
||||
|
||||
hello
|
||||
|
||||
world
|
||||
|
||||
abc
|
||||
|
||||
|
||||
0
|
||||
1
|
||||
2
|
||||
hello
|
||||
4
|
||||
world
|
||||
6
|
||||
abc
|
||||
8
|
||||
9
|
||||
|
||||
|
||||
|
||||
hello
|
||||
|
||||
world
|
||||
|
||||
abc
|
||||
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
hello
|
||||
-
|
||||
world
|
||||
-
|
||||
abc
|
||||
-
|
||||
-
|
||||
0
|
||||
0
|
||||
0
|
||||
111
|
||||
0
|
||||
222
|
||||
0
|
||||
333
|
||||
0
|
||||
0
|
7
dbms/tests/queries/0_stateless/00153_transform.sql
Normal file
7
dbms/tests/queries/0_stateless/00153_transform.sql
Normal file
@ -0,0 +1,7 @@
|
||||
SELECT transform(number, [3, 5, 7], [111, 222, 333]) FROM system.numbers LIMIT 10;
|
||||
SELECT transform(number, [3, 5, 7], [111, 222, 333], 9999) FROM system.numbers LIMIT 10;
|
||||
SELECT transform(number, [3, 5, 7], ['hello', 'world', 'abc'], '') FROM system.numbers LIMIT 10;
|
||||
SELECT transform(toString(number), ['3', '5', '7'], ['hello', 'world', 'abc']) FROM system.numbers LIMIT 10;
|
||||
SELECT transform(toString(number), ['3', '5', '7'], ['hello', 'world', 'abc'], '') FROM system.numbers LIMIT 10;
|
||||
SELECT transform(toString(number), ['3', '5', '7'], ['hello', 'world', 'abc'], '-') FROM system.numbers LIMIT 10;
|
||||
SELECT transform(toString(number), ['3', '5', '7'], [111, 222, 333], 0) FROM system.numbers LIMIT 10;
|
Loading…
Reference in New Issue
Block a user