Merge branch 'fix-prewhere-with-altered-columns' of github.com:yandex/ClickHouse into fix-prewhere-with-altered-columns

This commit is contained in:
Nikolai Kochetov 2018-10-09 21:57:14 +03:00
commit a668cd8d6d
4 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,13 @@
drop table if exists test.trepl;
create table test.trepl
(
d Date,
a Int32,
b Int32
) engine = ReplacingMergeTree(d, (a,b), 8192);
insert into test.trepl values ('2018-09-19', 1, 1);
select b from test.trepl FINAL prewhere a < 1000;
drop table test.trepl;

View File

@ -0,0 +1,13 @@
create database if not exists test;
drop table if exists test.t;
create table test.t (a Int32, b Int32) engine = MergeTree partition by (a,b) order by (a);
insert into test.t values (1, 1);
alter table test.t add column c Int32;
select b from test.t prewhere a < 1000;
select c from test.t where a < 1000;
select c from test.t prewhere a < 1000;
drop table test.t;