mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
fix system views test
This commit is contained in:
parent
72e05cda1f
commit
addce5c132
@ -1 +0,0 @@
|
||||
default views_test_view default views_test Materialized
|
@ -1,8 +0,0 @@
|
||||
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 name = 'views_test_view';
|
||||
DROP TABLE IF EXISTS views_test_view;
|
||||
SELECT * FROM system.views WHERE name = 'views_test_view';
|
||||
DROP TABLE IF EXISTS views_test;
|
1
tests/queries/0_stateless/02015_system_views.reference
Normal file
1
tests/queries/0_stateless/02015_system_views.reference
Normal file
@ -0,0 +1 @@
|
||||
02015_db materialized_view 02015_db view_source_tb Materialized
|
14
tests/queries/0_stateless/02015_system_views.sql
Normal file
14
tests/queries/0_stateless/02015_system_views.sql
Normal file
@ -0,0 +1,14 @@
|
||||
DROP DATABASE IF EXISTS 02015_db;
|
||||
CREATE DATABASE IF NOT EXISTS 02015_db;
|
||||
|
||||
DROP TABLE IF EXISTS 02015_db.view_source_tb;
|
||||
CREATE TABLE IF NOT EXISTS 02015_db.view_source_tb (a UInt8, s String) ENGINE = MergeTree() ORDER BY a;
|
||||
|
||||
DROP TABLE IF EXISTS 02015_db.materialized_view;
|
||||
CREATE MATERIALIZED VIEW IF NOT EXISTS 02015_db.materialized_view ENGINE = ReplacingMergeTree() ORDER BY a AS SELECT * FROM 02015_db.view_source_tb;
|
||||
|
||||
SELECT * FROM system.views WHERE database='02015_db' and name = 'materialized_view';
|
||||
|
||||
DROP TABLE IF EXISTS 02015_db.materialized_view;
|
||||
DROP TABLE IF EXISTS 02015_db.view_source_tb;
|
||||
DROP DATABASE IF EXISTS 02015_db;
|
Loading…
Reference in New Issue
Block a user