mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Merge 77a707e37a
into 44b4bd38b9
This commit is contained in:
commit
597fc6823d
@ -0,0 +1,37 @@
|
||||
a
|
||||
a
|
||||
a
|
||||
b
|
||||
xx
|
||||
xx
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
---
|
||||
4
|
||||
xx
|
||||
xx
|
||||
a 2020-01-01 00:00:00.000
|
||||
a 2020-01-01 10:10:10.000
|
||||
a 2020-01-01 10:10:10.110
|
||||
a 1
|
||||
a 1
|
||||
a 1
|
||||
a a
|
||||
a a
|
||||
a b
|
||||
a \N
|
||||
a \N
|
||||
a \N
|
||||
a \N
|
||||
a \N
|
||||
z a
|
23
tests/queries/0_stateless/03221_variant_logical_error.sql
Normal file
23
tests/queries/0_stateless/03221_variant_logical_error.sql
Normal file
@ -0,0 +1,23 @@
|
||||
set allow_experimental_variant_type = 1;
|
||||
|
||||
CREATE OR REPLACE TABLE test(
|
||||
key String,
|
||||
val Map(String, Variant(String, Int32, DateTime64(3, 'UTC')))
|
||||
) engine = ReplicatedMergeTree('/clickhouse/tables/{database}/table', '1')
|
||||
order by key;
|
||||
|
||||
insert into test VALUES ('a', {'a':'a', 'b':1, 'c': '2020-01-01 10:10:10.11'});
|
||||
insert into test VALUES ('', {'':'xx', '':4});
|
||||
insert into test VALUES ('', {'x':'xx'});
|
||||
insert into test VALUES ('', {});
|
||||
insert into test VALUES ('a', {'a':'a', 'b':1, 'c': '2020-01-01 10:10:10'});
|
||||
insert into test VALUES ('a', {'a':'b', 'b':1, 'c': '2020-01-01'});
|
||||
insert into test VALUES ('z', {'a':'a'});
|
||||
|
||||
insert into test VALUES ('a', {'a': Null});
|
||||
insert into test VALUES ('a', {'a': Null, 'a': Null});
|
||||
insert into test VALUES ('a', {'a': Null, 'c': Null});
|
||||
|
||||
SELECT variantElement(arrayJoin(mapValues(val)), 'String') FROM test ORDER BY ALL;
|
||||
select '---';
|
||||
SELECT key, arrayJoin(mapValues(val)) FROM test ORDER BY ALL;
|
Loading…
Reference in New Issue
Block a user