2019-04-16 14:13:13 +00:00
|
|
|
drop table if exists prewhere_alias;
|
|
|
|
CREATE TABLE prewhere_alias (a UInt8, b Int32, c UInt8 ALIAS a, d Int64 ALIAS b + 1, e Int32 alias a + b) ENGINE = MergeTree ORDER BY tuple();
|
|
|
|
insert into prewhere_alias values (1, 1);
|
2018-09-04 18:38:13 +00:00
|
|
|
select '-';
|
2019-04-16 14:13:13 +00:00
|
|
|
select a from prewhere_alias prewhere a = 1;
|
|
|
|
select b from prewhere_alias prewhere a = 1;
|
|
|
|
select c from prewhere_alias prewhere a = 1;
|
|
|
|
select d from prewhere_alias prewhere a = 1;
|
2018-09-04 18:38:13 +00:00
|
|
|
select '-';
|
2019-04-16 14:13:13 +00:00
|
|
|
select a from prewhere_alias prewhere b = 1;
|
|
|
|
select b from prewhere_alias prewhere b = 1;
|
|
|
|
select c from prewhere_alias prewhere b = 1;
|
|
|
|
select d from prewhere_alias prewhere b = 1;
|
2018-09-04 18:38:13 +00:00
|
|
|
select '-';
|
2019-04-16 14:13:13 +00:00
|
|
|
select a from prewhere_alias prewhere c = 1;
|
|
|
|
select b from prewhere_alias prewhere c = 1;
|
|
|
|
select c from prewhere_alias prewhere c = 1;
|
|
|
|
select d from prewhere_alias prewhere c = 1;
|
2018-09-04 18:38:13 +00:00
|
|
|
select '-';
|
2019-04-16 14:13:13 +00:00
|
|
|
select a from prewhere_alias prewhere d = 2;
|
|
|
|
select b from prewhere_alias prewhere d = 2;
|
|
|
|
select c from prewhere_alias prewhere d = 2;
|
|
|
|
select d from prewhere_alias prewhere d = 2;
|
2018-09-04 18:38:13 +00:00
|
|
|
select '-';
|
2019-04-16 14:13:13 +00:00
|
|
|
select a from prewhere_alias prewhere a;
|
|
|
|
select b from prewhere_alias prewhere a;
|
|
|
|
select c from prewhere_alias prewhere a;
|
|
|
|
select d from prewhere_alias prewhere a;
|
2018-09-04 18:38:13 +00:00
|
|
|
select '-';
|
2019-04-16 14:13:13 +00:00
|
|
|
select a from prewhere_alias prewhere c;
|
|
|
|
select b from prewhere_alias prewhere c;
|
|
|
|
select c from prewhere_alias prewhere c;
|
|
|
|
select d from prewhere_alias prewhere c;
|
|
|
|
drop table if exists prewhere_alias;
|
2018-09-04 18:38:13 +00:00
|
|
|
|