dbms: redesign stateless test 00229

This commit is contained in:
Andrey Mironov 2015-09-18 13:02:02 +03:00
parent a53f7473d3
commit 9b9e5bedf4
2 changed files with 30 additions and 6 deletions

View File

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

View File

@ -1,6 +1,6 @@
drop table if exists test_prewhere_column_missing;
create table test_prewhere_column_missing (d default today(), x UInt64) engine=MergeTree(d, x, 1);
create table test_prewhere_column_missing (d Date default '2015-01-01', x UInt64) engine=MergeTree(d, x, 1);
insert into test_prewhere_column_missing (x) values (0);
select * from test_prewhere_column_missing;
@ -12,4 +12,18 @@ 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;
select *, length(arr) as l from test_prewhere_column_missing;
select *, length(arr) as l from test_prewhere_column_missing where l = 0;
select *, length(arr) as l from test_prewhere_column_missing prewhere l = 0;
alter table test_prewhere_column_missing add column hash_x default intHash64(x);
select * from test_prewhere_column_missing;
select * from test_prewhere_column_missing where hash_x = intHash64(x);
select * from test_prewhere_column_missing prewhere hash_x = intHash64(x);
select * from test_prewhere_column_missing where hash_x = intHash64(x) and length(arr) = 0;
select * from test_prewhere_column_missing prewhere hash_x = intHash64(x) and length(arr) = 0;
select * from test_prewhere_column_missing where hash_x = intHash64(x) and length(arr) = 0 and arraySum(arr) = 0;
select * from test_prewhere_column_missing prewhere hash_x = intHash64(x) and length(arr) = 0 and arraySum(arr) = 0;
drop table test_prewhere_column_missing;