update system.views test

This commit is contained in:
zhongyuankai 2021-08-25 19:22:02 +08:00
parent 64efa917d8
commit 4f81ff97b2
2 changed files with 9 additions and 9 deletions

View File

@ -1 +1 @@
default table_views_test default table_views_test_view
default views_test default views_test_view

View File

@ -1,8 +1,8 @@
DROP TABLE IF EXISTS table_views_test;
CREATE TABLE table_views_test (a UInt8, s String) ENGINE = MergeTree() ORDER BY a;
DROP TABLE IF EXISTS table_views_test_view;
CREATE MATERIALIZED VIEW table_views_test_view ENGINE = ReplacingMergeTree() ORDER BY a AS SELECT * FROM table_views_test;
SELECT * FROM system.table_views WHERE view_table = 'table_views_test_view';
DROP TABLE IF EXISTS table_views_test_view;
SELECT * FROM system.table_views WHERE view_table = 'table_views_test_view';
DROP TABLE IF EXISTS table_views_test;
DROP TABLE IF EXISTS views_test;
CREATE TABLE views_test (a UInt8, s String) ENGINE = MergeTree() ORDER BY a;
DROP TABLE IF EXISTS views_test_view;
CREATE MATERIALIZED VIEW views_test_view ENGINE = ReplacingMergeTree() ORDER BY a AS SELECT * FROM views_test;
SELECT * FROM system.views WHERE view_table = 'views_test_view';
DROP TABLE IF EXISTS views_test_view;
SELECT * FROM system.views WHERE view_table = 'views_test_view';
DROP TABLE IF EXISTS views_test;