Merge pull request #49737 from ClickHouse/fix_lwd_and_object

Ignore LWD column in checkPartDynamicColumns
This commit is contained in:
Alexander Gololobov 2023-05-12 12:20:07 +02:00 committed by GitHub
commit 7c7565f094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View File

@ -3608,6 +3608,9 @@ void MergeTreeData::checkPartDynamicColumns(MutableDataPartPtr & part, DataParts
const auto & part_columns = part->getColumns();
for (const auto & part_column : part_columns)
{
if (part_column.name == LightweightDeleteDescription::FILTER_COLUMN.name)
continue;
auto storage_column = columns.getPhysical(part_column.name);
if (!storage_column.type->hasDynamicSubcolumns())
continue;

View File

@ -0,0 +1,14 @@
DROP TABLE IF EXISTS t_obj SYNC;
SET allow_experimental_object_type=1;
CREATE TABLE t_obj(id Int32, name Object('json')) ENGINE = MergeTree() ORDER BY id;
INSERT INTO t_obj select number, '{"a" : "' || toString(number) || '"}' FROM numbers(100);
DELETE FROM t_obj WHERE id = 10;
SELECT COUNT() FROM t_obj;
DROP TABLE t_obj SYNC;