mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 12:14:18 +00:00
Adding test case from https://github.com/ClickHouse/ClickHouse/issues/7773.
This commit is contained in:
parent
590a1f7b87
commit
16d6674c00
@ -0,0 +1,8 @@
|
||||
1 hello 2
|
||||
1 hello 2
|
||||
1 hello 3
|
||||
2 hello 3
|
||||
2 hello2 3
|
||||
1 hello 3
|
||||
2 hello 3
|
||||
2 hello2 3
|
@ -0,0 +1,30 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.A;
|
||||
DROP TABLE IF EXISTS test.B;
|
||||
|
||||
CREATE TABLE test.A (id Int32) Engine=Memory;
|
||||
CREATE TABLE test.B (id Int32, name String) Engine=Memory;
|
||||
|
||||
CREATE LIVE VIEW test.lv AS SELECT id, name FROM ( SELECT A.id, B.name FROM test.A as A, test.B as B WHERE A.id = B.id );
|
||||
|
||||
SELECT * FROM test.lv;
|
||||
|
||||
INSERT INTO test.A VALUES (1);
|
||||
INSERT INTO test.B VALUES (1, 'hello');
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
|
||||
INSERT INTO test.A VALUES (2)
|
||||
INSERT INTO test.B VALUES (2, 'hello')
|
||||
INSERT INTO test.B VALUES (2, 'hello2')
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.A;
|
||||
DROP TABLE test.B;
|
||||
|
Loading…
Reference in New Issue
Block a user