dbms: added test for function 'transform' [#METR-15987].

This commit is contained in:
Alexey Milovidov 2015-04-28 06:56:23 +03:00
parent 123cd3340d
commit 3f4f96ad7d
2 changed files with 77 additions and 0 deletions

View 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

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