mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
add tests
This commit is contained in:
parent
10cf9e5b9f
commit
36303a82f7
@ -166,3 +166,12 @@ d
|
||||
e
|
||||
u
|
||||
v
|
||||
--JSONExtractArrayRaw--
|
||||
[]
|
||||
[]
|
||||
[]
|
||||
['[]','[]']
|
||||
['-100','200','300']
|
||||
['1','2','3','4','5','"hello"']
|
||||
['1','2','3']
|
||||
['4','5','6']
|
||||
|
@ -182,3 +182,12 @@ SELECT JSONExtractRaw('{"abc":"\\u263a"}', 'abc');
|
||||
SELECT '--const/non-const mixed--';
|
||||
SELECT JSONExtractString('["a", "b", "c", "d", "e"]', idx) FROM (SELECT arrayJoin([1,2,3,4,5]) AS idx);
|
||||
SELECT JSONExtractString(json, 's') FROM (SELECT arrayJoin(['{"s":"u"}', '{"s":"v"}']) AS json);
|
||||
|
||||
SELECT '--JSONExtractArrayRaw--';
|
||||
SELECT JSONExtractArrayRaw('');
|
||||
SELECT JSONExtractArrayRaw('{"a": "hello", "b": "not_array"}');
|
||||
SELECT JSONExtractArrayRaw('[]');
|
||||
SELECT JSONExtractArrayRaw('[[],[]]');
|
||||
SELECT JSONExtractArrayRaw('{"a": "hello", "b": [-100, 200.0, 300]}', 'b');
|
||||
SELECT JSONExtractArrayRaw('[1,2,3,4,5,"hello"]');
|
||||
SELECT JSONExtractArrayRaw(arrayJoin(JSONExtractArrayRaw('[[1,2,3],[4,5,6]]')));
|
||||
|
Loading…
Reference in New Issue
Block a user