diff --git a/tests/queries/0_stateless/01263_type_conversion_nvartolomei.reference b/tests/queries/0_stateless/01263_type_conversion_nvartolomei.reference new file mode 100644 index 00000000000..09b593dad3d --- /dev/null +++ b/tests/queries/0_stateless/01263_type_conversion_nvartolomei.reference @@ -0,0 +1,7 @@ +123 +123 +a +a +--- +a +a diff --git a/tests/queries/0_stateless/01263_type_conversion_nvartolomei.sql b/tests/queries/0_stateless/01263_type_conversion_nvartolomei.sql new file mode 100644 index 00000000000..e3d66e9cdba --- /dev/null +++ b/tests/queries/0_stateless/01263_type_conversion_nvartolomei.sql @@ -0,0 +1,50 @@ +DROP TABLE IF EXISTS m; +DROP TABLE IF EXISTS d; + +CREATE TABLE m +( + `v` UInt8 +) +ENGINE = MergeTree() +PARTITION BY tuple() +ORDER BY v; + +CREATE TABLE d +( + `v` UInt16 +) +ENGINE = Distributed('test_cluster_two_shards', currentDatabase(), m, rand()); + +INSERT INTO m VALUES (123); +SELECT * FROM d; + + +DROP TABLE m; +DROP TABLE d; + + +CREATE TABLE m +( + `v` Enum8('a' = 1, 'b' = 2) +) +ENGINE = MergeTree() +PARTITION BY tuple() +ORDER BY v; + +CREATE TABLE d +( + `v` Enum8('a' = 1) +) +ENGINE = Distributed('test_cluster_two_shards', currentDatabase(), m, rand()); + +INSERT INTO m VALUES ('a'); +SELECT * FROM d; + +SELECT '---'; + +INSERT INTO m VALUES ('b'); +SELECT v FROM d ORDER BY v; -- { clientError 36 } + + +DROP TABLE m; +DROP TABLE d;