-
-
Save tom-clickhouse/c4f3da235843252b7b5c38472bdeba5d to your computer and use it in GitHub Desktop.
Variant type
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, 24]), | |
(43), | |
(NULL), | |
([25]), | |
(44), | |
(''), | |
([26, 27]); | |
SELECT * FROM test; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment