2022-07-27 12:37:43 +00:00
#!/usr/bin/env bash
2022-07-27 19:09:15 +00:00
# Tags: no-fasttest, no-parallel, no-replicated-database
2022-07-27 12:37:43 +00:00
CURDIR = $( cd " $( dirname " ${ BASH_SOURCE [0] } " ) " && pwd )
# shellcheck source=../shell_config.sh
. " $CURDIR " /../shell_config.sh
2023-03-07 11:30:54 +00:00
opts = (
2024-07-12 12:49:26 +00:00
"--enable_analyzer=0"
2023-03-07 11:30:54 +00:00
)
2024-07-29 20:06:55 +00:00
${ CLICKHOUSE_CLIENT } " ${ opts [@] } " --multiline --query "" "
2022-07-27 12:37:43 +00:00
DROP TABLE IF EXISTS mt ON CLUSTER test_shard_localhost;
DROP TABLE IF EXISTS wv ON CLUSTER test_shard_localhost;
2023-07-16 01:14:58 +00:00
CREATE TABLE mt ON CLUSTER test_shard_localhost ( a Int32, timestamp DateTime) ENGINE = MergeTree ORDER BY tuple( ) ;
2022-07-27 12:37:43 +00:00
CREATE WINDOW VIEW wv ON CLUSTER test_shard_localhost TO input_deduplicated INNER ENGINE Memory WATERMARK = INTERVAL '1' SECOND AS SELECT count( a) , hopStart( wid) AS w_start, hopEnd( wid) AS w_end FROM mt GROUP BY hop( timestamp, INTERVAL '3' SECOND, INTERVAL '5' SECOND) AS wid;
"" " 2>&1 | grep -q -e " Code: 344" -e " Code: 60" && echo 'ok' || echo 'fail' ||: