mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Backport #70147 to 24.9: Fix Dynamic type creation of JSON subcolumn
This commit is contained in:
parent
9a435e4c9e
commit
03aab5abad
@ -404,7 +404,7 @@ std::unique_ptr<ISerialization::SubstreamData> DataTypeObject::getDynamicSubcolu
|
||||
else
|
||||
{
|
||||
res = std::make_unique<SubstreamData>(std::make_shared<SerializationDynamic>());
|
||||
res->type = std::make_shared<DataTypeDynamic>();
|
||||
res->type = std::make_shared<DataTypeDynamic>(max_dynamic_types);
|
||||
}
|
||||
|
||||
/// If column was provided, we should create a column for requested subcolumn.
|
||||
|
@ -0,0 +1,5 @@
|
||||
Dynamic(max_types=1)
|
||||
Dynamic(max_types=1)
|
||||
1
|
||||
1
|
||||
1
|
@ -0,0 +1,8 @@
|
||||
set allow_experimental_json_type=1;
|
||||
set enable_analyzer=1;
|
||||
drop table if exists test;
|
||||
create table test (json JSON(max_dynamic_types=1)) engine=Memory;
|
||||
insert into test values ('{"c0" : 1}'), ('{"c0" : 2}');
|
||||
select toTypeName(json.c0) from test;
|
||||
SELECT 1 FROM (SELECT 1 AS c0) tx FULL OUTER JOIN test ON test.json.Float32 = tx.c0;
|
||||
drop table test;
|
Loading…
Reference in New Issue
Block a user