mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
26 lines
641 B
Plaintext
26 lines
641 B
Plaintext
-- { echoOn }
|
|
select JSONArrayLength(null);
|
|
\N
|
|
select JSONArrayLength('');
|
|
\N
|
|
select JSONArrayLength('[]');
|
|
0
|
|
select JSONArrayLength('[1,2,3]');
|
|
3
|
|
select JSONArrayLength('[[1,2],[5,6,7]]');
|
|
2
|
|
select JSONArrayLength('[{"a":123},{"b":"hello"}]');
|
|
2
|
|
select JSONArrayLength('[1,2,3,[33,44],{"key":[2,3,4]}]');
|
|
5
|
|
select JSONArrayLength('{"key":"not a json array"}');
|
|
\N
|
|
select JSONArrayLength('[1,2,3,4,5');
|
|
\N
|
|
select JSON_ARRAY_LENGTH('[1,2,3,4,5');
|
|
\N
|
|
select JSON_ARRAY_LENGTH('[1,2,3,4,5]');
|
|
5
|
|
select JSONArrayLength(2); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT }
|
|
select JSONArrayLength(); -- { serverError NUMBER_OF_ARGUMENTS_DOESNT_MATCH }
|