From 869c933972dda6c2bea1e5e539b7e5d06f45b7e1 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 8 May 2020 19:15:49 +0300 Subject: [PATCH] Added test. --- .../0_stateless/01275_parallel_mv.reference | 4 ++++ .../queries/0_stateless/01275_parallel_mv.sql | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/queries/0_stateless/01275_parallel_mv.reference create mode 100644 tests/queries/0_stateless/01275_parallel_mv.sql diff --git a/tests/queries/0_stateless/01275_parallel_mv.reference b/tests/queries/0_stateless/01275_parallel_mv.reference new file mode 100644 index 00000000000..898d3f7266e --- /dev/null +++ b/tests/queries/0_stateless/01275_parallel_mv.reference @@ -0,0 +1,4 @@ +10 +10 +0 +10 diff --git a/tests/queries/0_stateless/01275_parallel_mv.sql b/tests/queries/0_stateless/01275_parallel_mv.sql new file mode 100644 index 00000000000..b67fbf02f8d --- /dev/null +++ b/tests/queries/0_stateless/01275_parallel_mv.sql @@ -0,0 +1,18 @@ +drop table if exists testX; +drop table if exists testXA; +drop table if exists testXB; +drop table if exists testXC; + +create table testX (A Int64) engine=MergeTree order by tuple(); + +create materialized view testXA engine=MergeTree order by tuple() as select sleep(1) from testX; +create materialized view testXB engine=MergeTree order by tuple() as select sleep(2), throwIf(A=1) from testX; +create materialized view testXC engine=MergeTree order by tuple() as select sleep(1) from testX; + +set parallel_view_processing=1; +insert into testX select number from numbers(10); -- {serverError 395} + +select count() from testX; +select count() from testXA; +select count() from testXB; +select count() from testXC;