mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-19 04:42:37 +00:00
24 lines
774 B
SQL
24 lines
774 B
SQL
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;
|
|
|
|
|