diff --git a/tests/queries/0_stateless/01396_low_cardinality_fixed_string_default.reference b/tests/queries/0_stateless/01396_low_cardinality_fixed_string_default.reference new file mode 100644 index 00000000000..29d473e7a8f --- /dev/null +++ b/tests/queries/0_stateless/01396_low_cardinality_fixed_string_default.reference @@ -0,0 +1,4 @@ +1 -- +1 RU +1 -- +1 RU diff --git a/tests/queries/0_stateless/01396_low_cardinality_fixed_string_default.sql b/tests/queries/0_stateless/01396_low_cardinality_fixed_string_default.sql new file mode 100644 index 00000000000..e31c402559e --- /dev/null +++ b/tests/queries/0_stateless/01396_low_cardinality_fixed_string_default.sql @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS test; +CREATE TABLE test +( + id UInt32, + code LowCardinality(FixedString(2)) DEFAULT '--' +) ENGINE = MergeTree() PARTITION BY id ORDER BY id; + +INSERT INTO test FORMAT CSV 1,RU +INSERT INTO test FORMAT CSV 1, + +SELECT * FROM test ORDER BY code; +OPTIMIZE TABLE test; +SELECT * FROM test ORDER BY code; + +DROP TABLE test;