mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
improve test
This commit is contained in:
parent
567a08a88f
commit
74596ed8dc
@ -18,6 +18,9 @@ y y
|
||||
2 2
|
||||
2 2
|
||||
2 2
|
||||
3 3
|
||||
3 3
|
||||
3 3
|
||||
2 y 2 w
|
||||
2 y 2 w
|
||||
2 2
|
||||
@ -38,3 +41,6 @@ y y
|
||||
2 2
|
||||
2 2
|
||||
2 2
|
||||
3 3
|
||||
3 3
|
||||
3 3
|
||||
|
@ -1,13 +1,14 @@
|
||||
use test;
|
||||
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
drop table if exists t3;
|
||||
|
||||
create table t1 (a UInt32, b String) engine = Memory;
|
||||
create table t2 (c UInt32, d String) engine = Memory;
|
||||
create table t3 (a UInt32) engine = Memory;
|
||||
|
||||
insert into t1 values (1, 'x'), (2, 'y'), (3, 'z');
|
||||
insert into t2 values (2, 'w'), (4, 'y');
|
||||
insert into t3 values (3);
|
||||
|
||||
set enable_optimize_predicate_expression = 0;
|
||||
|
||||
@ -37,6 +38,10 @@ select t1.a as c, t2.c as a from t1 join t2 on c = a;
|
||||
select t1.a as c, t2.c as a from t1 join t2 on t1.a = t2.c;
|
||||
select t1.a as c, t2.c as a from t1 join t2 on t2.c = t1.a;
|
||||
|
||||
select t1.a, t3.a from t1 join t3 on t1.a = t3.a;
|
||||
select t1.a as t1_a, t3.a as t3_a from t1 join t3 on t1_a = t3_a;
|
||||
select table1.a as t1_a, table3.a as t3_a from t1 as table1 join t3 as table3 on t1_a = t3_a;
|
||||
|
||||
set enable_optimize_predicate_expression = 1;
|
||||
|
||||
select * from t1 join t2 on a = c;
|
||||
@ -65,5 +70,10 @@ select t1.a as c, t2.c as a from t1 join t2 on c = a;
|
||||
select t1.a as c, t2.c as a from t1 join t2 on t1.a = t2.c;
|
||||
select t1.a as c, t2.c as a from t1 join t2 on t2.c = t1.a;
|
||||
|
||||
select t1.a, t3.a from t1 join t3 on t1.a = t3.a;
|
||||
select t1.a as t1_a, t3.a as t3_a from t1 join t3 on t1_a = t3_a;
|
||||
select table1.a as t1_a, table3.a as t3_a from t1 as table1 join t3 as table3 on t1_a = t3_a;
|
||||
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
|
Loading…
Reference in New Issue
Block a user