Merge pull request #47682 from den-crane/fix_test_01656_join_defaul_enum

fix test / remove hardcoded database
This commit is contained in:
robot-clickhouse 2023-03-17 22:44:52 +01:00 committed by GitHub
commit e7a5cc5b53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,18 +1,9 @@
DROP DATABASE IF EXISTS test_01656; CREATE TABLE table_key (keycol UInt16) ENGINE = MergeTree() ORDER BY (keycol) PARTITION BY tuple()
as SELECT * FROM VALUES ( (1), (2), (3) );
CREATE DATABASE test_01656;
USE test_01656;
DROP TABLE IF EXISTS table_key;
DROP TABLE IF EXISTS table_with_enum;
CREATE TABLE table_key (keycol UInt16) ENGINE = MergeTree() ORDER BY (keycol) PARTITION BY tuple();
CREATE TABLE table_with_enum (keycol UInt16, enum_col Enum8('First' = 1,'Second' = 2)) CREATE TABLE table_with_enum (keycol UInt16, enum_col Enum8('First' = 1,'Second' = 2))
ENGINE = MergeTree() ORDER BY (keycol) PARTITION BY tuple(); ENGINE = MergeTree() ORDER BY (keycol) PARTITION BY tuple()
as SELECT * FROM VALUES ( (2, 'Second'), (4, 'Second') );
INSERT INTO table_key VALUES (1), (2), (3);
INSERT INTO table_with_enum VALUES (2, 'Second'), (4, 'Second');
SET join_algorithm = 'hash'; SET join_algorithm = 'hash';
@ -34,7 +25,6 @@ SELECT keycol, enum_col FROM table_with_enum LEFT JOIN table_key USING (keycol)
SELECT keycol, enum_col FROM table_with_enum RIGHT JOIN table_key USING (keycol) ORDER BY keycol; SELECT keycol, enum_col FROM table_with_enum RIGHT JOIN table_key USING (keycol) ORDER BY keycol;
SELECT keycol, enum_col FROM table_with_enum FULL JOIN table_key USING (keycol) ORDER BY keycol; SELECT keycol, enum_col FROM table_with_enum FULL JOIN table_key USING (keycol) ORDER BY keycol;
DROP TABLE IF EXISTS table_key; DROP TABLE table_key;
DROP TABLE IF EXISTS table_with_enum; DROP TABLE table_with_enum;
DROP DATABASE IF EXISTS test_01656;