Update 03228_variant_permutation_issue.sql

This commit is contained in:
Kruglov Pavel 2024-08-27 14:53:42 +02:00 committed by GitHub
parent c7c3222dab
commit 6d69cd1f84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1 +1,9 @@
SET allow_experimental_variant_type = 1;
select 'test';
drop table if exists test;
create table test (id UInt32, data Variant(String), version UInt64) engine=ReplacingMergeTree(version) order by id;
insert into test values (1, NULL, 1), (2, 'bar', 1), (3, 'bar', 1);
insert into test select id, 'baz' as _data, version+1 as _version from test where id=2;
select * from test final WHERE data is not null format Null;
drop table test;