-
-
Save tom-clickhouse/56b56271239eb2b7c9a8ca970f62611f to your computer and use it in GitHub Desktop.
Variant type nested
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET | |
allow_experimental_variant_type=1, | |
use_variant_as_common_type = 1; | |
CREATE OR REPLACE TABLE test | |
( | |
c Variant(Int64, String, Array(Variant(Int64, String))) | |
) | |
ENGINE = MergeTree | |
ORDER BY tuple() | |
SETTINGS | |
min_bytes_for_wide_part = 1, | |
min_rows_for_wide_part = 1; | |
INSERT INTO test values | |
(42), | |
('foo'), | |
([23, 'bar', 24]), | |
(43), | |
(NULL), | |
(['baz', 25]), | |
(44), | |
(''), | |
([26, 27, NULL]); | |
SELECT * FROM test; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment