This commit is contained in:
Vxider 2022-06-02 11:13:01 +00:00
parent 8221fcd5f1
commit 6c7a59a0f6
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,13 @@
.inner.target.wv
.inner.wv
mt
wv
mt
.inner.target.wv
.inner.wv
mt
.inner.target.wv
.inner.wv
mt
wv
mt

View File

@ -0,0 +1,28 @@
-- Tags: no-parallel
SET allow_experimental_window_view = 1;
DROP DATABASE IF EXISTS test_01085;
CREATE DATABASE test_01085 ENGINE=Ordinary;
DROP TABLE IF EXISTS test_01085.mt;
DROP TABLE IF EXISTS test_01085.wv;
CREATE TABLE test_01085.mt(a Int32, market Int32, timestamp DateTime) ENGINE=MergeTree ORDER BY tuple();
CREATE WINDOW VIEW test_01085.wv ENGINE Memory WATERMARK=ASCENDING AS SELECT count(a) AS count, market, tumbleEnd(wid) AS w_end FROM test_01085.mt GROUP BY tumble(timestamp, INTERVAL '5' SECOND) AS wid, market;
SHOW tables FROM test_01085;
DROP TABLE test_01085.wv NO DELAY;
SHOW tables FROM test_01085;
CREATE WINDOW VIEW test_01085.wv ENGINE Memory WATERMARK=ASCENDING AS SELECT count(a) AS count, market, tumbleEnd(wid) AS w_end FROM test_01085.mt GROUP BY tumble(timestamp, INTERVAL '5' SECOND) AS wid, market;
DETACH TABLE test_01085.wv;
SHOW tables FROM test_01085;
ATTACH TABLE test_01085.wv;
SHOW tables FROM test_01085;
DROP TABLE test_01085.wv NO DELAY;
SHOW tables FROM test_01085;