update system views test

This commit is contained in:
zhongyuankai 2021-08-27 10:41:15 +08:00
parent 5976869451
commit 306da6f414
3 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ NamesAndTypesList StorageSystemViews::getNamesAndTypes()
{"name", std::make_shared<DataTypeString>()},
{"table", std::make_shared<DataTypeString>()},
{"table_database", std::make_shared<DataTypeString>()},
{"view_type", std::move(view_type_datatype)},
{"type", std::move(view_type_datatype)},
};
}

View File

@ -1 +1 @@
default views_test default views_test_view Materialized
default views_test_view default views_test Materialized

View File

@ -2,7 +2,7 @@ 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';
SELECT * FROM system.views WHERE database = 'default' and view_table = 'views_test_view';
DROP TABLE IF EXISTS views_test_view;
SELECT * FROM system.views WHERE view_table = 'views_test_view';
SELECT * FROM system.views WHERE database = 'default' and view_table = 'views_test_view';
DROP TABLE IF EXISTS views_test;