dbms:: add test for missing column in PREWHERE [#METR-18009]

This commit is contained in:
Andrey Mironov 2015-09-16 18:33:58 +03:00
parent 9716ef7b34
commit c6ec4f9ff5
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,5 @@
2015-09-16 0
2015-09-16 0 []
2015-09-16 0 [] 0
2015-09-16 0 [] 0
2015-09-16 0 [] 0

View File

@ -0,0 +1,15 @@
drop table if exists test_prewhere_column_missing;
create table test_prewhere_column_missing (d default today(), x UInt64) engine=MergeTree(d, x, 1);
insert into test_prewhere_column_missing (x) values (0);
select * from test_prewhere_column_missing;
alter table test_prewhere_column_missing add column arr Array(UInt64);
select * from test_prewhere_column_missing;
select *, arraySum(arr) as s from test_prewhere_column_missing;
select *, arraySum(arr) as s from test_prewhere_column_missing where s = 0;
select *, arraySum(arr) as s from test_prewhere_column_missing prewhere s = 0;
drop table test_prewhere_column_missing;