mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
add tests
This commit is contained in:
parent
10cf9e5b9f
commit
36303a82f7
@ -166,3 +166,12 @@ d
|
|||||||
e
|
e
|
||||||
u
|
u
|
||||||
v
|
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 '--const/non-const mixed--';
|
||||||
SELECT JSONExtractString('["a", "b", "c", "d", "e"]', idx) FROM (SELECT arrayJoin([1,2,3,4,5]) AS idx);
|
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 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