Merge branch 'master' of github.com:yandex/ClickHouse

This commit is contained in:
Alexey Milovidov 2018-03-08 04:51:10 +03:00
commit b97d680e36
4 changed files with 18 additions and 1 deletions

View File

@ -2,8 +2,11 @@ DROP TABLE IF EXISTS test.null;
DROP TABLE IF EXISTS test.null_view; DROP TABLE IF EXISTS test.null_view;
CREATE TABLE test.null (x UInt8) ENGINE = Null; CREATE TABLE test.null (x UInt8) ENGINE = Null;
CREATE VIEW test.null_view AS SELECT * FROM test.null WHERE toUInt64(x) IN (SELECT number FROM system.numbers); CREATE VIEW test.null_view AS SELECT * FROM test.null;
INSERT INTO test.null VALUES (1); INSERT INTO test.null VALUES (1);
SELECT * FROM test.null;
SELECT * FROM test.null_view;
DROP TABLE test.null; DROP TABLE test.null;
DROP TABLE test.null_view; DROP TABLE test.null_view;

View File

@ -0,0 +1 @@
CREATE VIEW test.test_view ( id UInt64) AS SELECT * FROM test.test WHERE id = (SELECT 1)

View File

@ -0,0 +1,13 @@
DROP TABLE IF EXISTS test.test;
DROP TABLE IF EXISTS test.test_view;
CREATE TABLE test.test(id UInt64) ENGINE = Log;
CREATE VIEW test.test_view AS SELECT * FROM test.test WHERE id = (SELECT 1);
DETACH TABLE test.test_view;
ATTACH TABLE test.test_view;
SHOW CREATE TABLE test.test_view;
DROP TABLE IF EXISTS test.test;
DROP TABLE IF EXISTS test.test_view;