mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
add test
This commit is contained in:
parent
8221fcd5f1
commit
6c7a59a0f6
13
tests/queries/0_stateless/01085_window_view_attach.reference
Normal file
13
tests/queries/0_stateless/01085_window_view_attach.reference
Normal 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
|
28
tests/queries/0_stateless/01085_window_view_attach.sql
Normal file
28
tests/queries/0_stateless/01085_window_view_attach.sql
Normal 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;
|
Loading…
Reference in New Issue
Block a user