1. Fix test error 2. Add more test cases

This commit is contained in:
spongedc 2020-12-17 11:28:18 +08:00
parent 6a7af594e3
commit bcaccab0ff
3 changed files with 29 additions and 1 deletions

View File

@ -59,7 +59,7 @@ SHOW CREATE distributed;
SHOW CREATE distributed_tf;
SHOW CREATE url;
SHOW CREATE rich_syntax;
SHOW CREATE view;
SHOW CREATE VIEW view;
SHOW CREATE dict;
INSERT INTO buffer VALUES (1);

View File

@ -1,3 +1,7 @@
CREATE VIEW test_1602.v\n(\n `EventDate` DateTime,\n `CounterID` UInt32,\n `UserID` UInt32\n) AS\nSELECT *\nFROM test_1602.tbl
CREATE MATERIALIZED VIEW test_1602.vv\n(\n `EventDate` DateTime,\n `CounterID` UInt32,\n `UserID` UInt32\n)\nENGINE = MergeTree\nPARTITION BY toYYYYMM(EventDate)\nORDER BY (CounterID, EventDate, intHash32(UserID))\nSETTINGS index_granularity = 8192 AS\nSELECT *\nFROM test_1602.tbl
CREATE LIVE VIEW test_1602.vvv\n(\n `EventDate` DateTime,\n `CounterID` UInt32,\n `UserID` UInt32\n) AS\nSELECT *\nFROM test_1602.tbl
CREATE VIEW test_1602.VIEW\n(\n `EventDate` DateTime,\n `CounterID` UInt32,\n `UserID` UInt32\n) AS\nSELECT *\nFROM test_1602.tbl
CREATE VIEW test_1602.DATABASE\n(\n `EventDate` DateTime,\n `CounterID` UInt32,\n `UserID` UInt32\n) AS\nSELECT *\nFROM test_1602.tbl
CREATE VIEW test_1602.DICTIONARY\n(\n `EventDate` DateTime,\n `CounterID` UInt32,\n `UserID` UInt32\n) AS\nSELECT *\nFROM test_1602.tbl
CREATE VIEW test_1602.TABLE\n(\n `EventDate` DateTime,\n `CounterID` UInt32,\n `UserID` UInt32\n) AS\nSELECT *\nFROM test_1602.tbl

View File

@ -5,8 +5,16 @@ CREATE DATABASE test_1602;
CREATE TABLE test_1602.tbl (`EventDate` DateTime, `CounterID` UInt32, `UserID` UInt32) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SETTINGS index_granularity = 8192;
CREATE VIEW test_1602.v AS SELECT * FROM test_1602.tbl;
CREATE VIEW test_1602.DATABASE AS SELECT * FROM test_1602.tbl;
CREATE VIEW test_1602.DICTIONARY AS SELECT * FROM test_1602.tbl;
CREATE VIEW test_1602.TABLE AS SELECT * FROM test_1602.tbl;
CREATE MATERIALIZED VIEW test_1602.vv (`EventDate` DateTime, `CounterID` UInt32, `UserID` UInt32) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SETTINGS index_granularity = 8192 AS SELECT * FROM test_1602.tbl;
CREATE VIEW test_1602.VIEW AS SELECT * FROM test_1602.tbl;
SET allow_experimental_live_view=1;
@ -24,4 +32,20 @@ SHOW CREATE VIEW test_1602.tbl; -- { serverError 36 }
SHOW CREATE TEMPORARY VIEW; -- { serverError 60 }
SHOW CREATE VIEW; -- { clientError 62 }
SHOW CREATE DATABASE; -- { clientError 62 }
SHOW CREATE DICTIONARY; -- { clientError 62 }
SHOW CREATE TABLE; -- { clientError 62 }
SHOW CREATE test_1602.VIEW;
SHOW CREATE test_1602.DATABASE;
SHOW CREATE test_1602.DICTIONARY;
SHOW CREATE test_1602.TABLE;
DROP DATABASE IF EXISTS test_1602;