repro: materialized_views_ignore_errors metes errors from source table

This commit is contained in:
Sema Checherinda 2024-07-12 15:40:13 +02:00
parent ad21a9307f
commit 1433a389f4
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,14 @@
-- { echoOn }
insert into testX select number from numbers(20)
settings materialized_views_ignore_errors = 0; -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }
select count() from testX;
0
select count() from testXA;
0
insert into testX select number from numbers(20)
settings materialized_views_ignore_errors = 1;
select count() from testX;
0
select count() from testXA;
0

View File

@ -0,0 +1,28 @@
-- more blocks to process
set max_block_size = 10;
set min_insert_block_size_rows = 10;
drop table if exists testX;
drop table if exists testXA;
create table testX (A Int64) engine=MergeTree partition by (intDiv(A, 10), throwIf(A=2)) order by tuple();
create materialized view testXA engine=MergeTree order by tuple() as select sleep(0.1) from testX;
-- { echoOn }
insert into testX select number from numbers(20)
settings materialized_views_ignore_errors = 0; -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }
select count() from testX;
select count() from testXA;
insert into testX select number from numbers(20)
settings materialized_views_ignore_errors = 1;
select count() from testX;
select count() from testXA;
-- { echoOff }
drop table testX;
drop view testXA;