Added test [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-05-10 04:46:07 -04:00
parent 2a57cfdbc2
commit 66436db836
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,13 @@
['0','','1','','2','','3','','4','','5','','6','','7','','8','','9']
['0','-','1','-','2','-','3','-','4','-','5','-','6','-','7','-','8','-','9']
[[],[123],[0],[123],[0,1],[123],[0,1,2],[123],[0,1,2,3],[123],[0,1,2,3,4],[123],[0,1,2,3,4,5],[123],[0,1,2,3,4,5,6],[123],[0,1,2,3,4,5,6,7],[123],[0,1,2,3,4,5,6,7,8]]
0 [0]
1 [0,1]
2 [0,0,2]
3 [0,0,0,3]
4 [0,0,0,0,4]
5 [0,0,0,0,0,5]
6 [0,0,0,0,0,0,6]
7 [0,0,0,0,0,0,0,7]
8 [0,0,0,0,0,0,0,0,8]
9 [0,0,0,0,0,0,0,0,0,9]

View File

@ -0,0 +1,4 @@
SELECT groupArrayInsertAt(toString(number), number * 2) FROM (SELECT * FROM system.numbers LIMIT 10);
SELECT groupArrayInsertAt('-')(toString(number), number * 2) FROM (SELECT * FROM system.numbers LIMIT 10);
SELECT groupArrayInsertAt([123])(range(number), number * 2) FROM (SELECT * FROM system.numbers LIMIT 10);
SELECT number, groupArrayInsertAt(number, number) FROM (SELECT * FROM system.numbers LIMIT 10) GROUP BY number ORDER BY number;