ClickHouse/tests/queries/0_stateless/03279_not_empty_json.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
774 B
MySQL
Raw Normal View History

2024-12-03 13:15:14 +00:00
set enable_json_type=1;
create table test (json JSON) engine=Memory;
insert into test values ('{}'), ('{"a" : 42}'), ('{"b" : {"c" : 42}}');
select json, notEmpty(json) from test;
drop table test;
create table test (json JSON(a UInt32)) engine=Memory;
insert into test values ('{}'), ('{"a" : 42}'), ('{"b" : {"c" : 42}}');
select json, notEmpty(json) from test;
drop table test;
create table test (json JSON(max_dynamic_paths=1)) engine=Memory;
insert into test values ('{}'), ('{"a" : 42}'), ('{"b" : {"c" : 42}}');
select json, notEmpty(json) from test;
drop table test;
create table test (json JSON(max_dynamic_paths=0)) engine=Memory;
insert into test values ('{}'), ('{"a" : 42}'), ('{"b" : {"c" : 42}}');
select json, notEmpty(json) from test;
drop table test;