Added a test for Enum conversion in Distributed table if one shard is local

This commit is contained in:
Alexey Milovidov 2020-09-21 21:15:41 +03:00
parent c240f464d2
commit 6e596b9c7d
3 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,21 @@
abc
def
ghi
---
abc
def
xyz
---
abc
def
xyz
abc
def
xyz
---
abc
def
xyz
abc
def
xyz

View File

@ -0,0 +1,23 @@
DROP TABLE IF EXISTS t;
DROP TABLE IF EXISTS d;
CREATE TABLE t (x Enum8('abc' = 0, 'def' = 1, 'ghi' = 2)) ENGINE = TinyLog;
INSERT INTO t VALUES (0), (1), (2);
SELECT * FROM t;
SELECT '---';
CREATE TABLE d (x Enum8('abc' = 0, 'def' = 1, 'xyz' = 2)) ENGINE = Distributed(test_shard_localhost, currentDatabase(), t);
SELECT * FROM d;
DROP TABLE d;
SELECT '---';
CREATE TABLE d (x Enum8('abc' = 0, 'def' = 1, 'xyz' = 2)) ENGINE = Distributed(test_cluster_two_shards, currentDatabase(), t);
SELECT * FROM d;
DROP TABLE d;
SELECT '---';
CREATE TABLE d (x Enum8('abc' = 0, 'def' = 1, 'xyz' = 2)) ENGINE = Distributed(test_cluster_two_shards_localhost, currentDatabase(), t);
SELECT * FROM d;
DROP TABLE d;
DROP TABLE t;

View File

@ -144,3 +144,4 @@
01473_event_time_microseconds
01461_query_start_time_microseconds
01455_shard_leaf_max_rows_bytes_to_read
01505_distributed_local_type_conversion_enum