ClickHouse/dbms/tests/queries/0_stateless/00712_prewhere_with_missing_columns_2.sql

14 lines
329 B
MySQL
Raw Normal View History

2018-10-04 18:18:04 +00:00
create database if not exists test;
drop table if exists t;
create table t (a Int32, b Int32) engine = MergeTree partition by (a,b) order by (a);
2018-10-04 18:18:04 +00:00
insert into t values (1, 1);
alter table t add column c Int32;
2018-10-04 18:18:04 +00:00
select b from t prewhere a < 1000;
select c from t where a < 1000;
select c from t prewhere a < 1000;
2018-10-04 18:18:04 +00:00
drop table t;
2018-10-04 18:18:04 +00:00