mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
one more test
This commit is contained in:
parent
332cb7bde7
commit
f79851591a
@ -0,0 +1,46 @@
|
||||
join_use_nulls = 1
|
||||
1 1
|
||||
2 2
|
||||
-
|
||||
1 1
|
||||
-
|
||||
1 1 1 1
|
||||
-
|
||||
1 1
|
||||
2 2
|
||||
-
|
||||
-
|
||||
-
|
||||
1 1 1 1
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
join_use_nulls = 0
|
||||
1 1
|
||||
2 2
|
||||
-
|
||||
1 1
|
||||
-
|
||||
1 1 1 1
|
||||
-
|
||||
1 1
|
||||
2 2
|
||||
-
|
||||
1 1 1 1
|
||||
2 2 0 0
|
||||
-
|
||||
1 1 1 1
|
||||
2 2 0 0
|
||||
-
|
||||
1 1 1 1
|
||||
-
|
||||
-
|
||||
-
|
||||
1 1 0 0
|
||||
2 2 0 0
|
||||
-
|
||||
1 1 1 1
|
||||
2 2 0 0
|
||||
-
|
@ -0,0 +1,64 @@
|
||||
drop table if exists t;
|
||||
drop table if exists s;
|
||||
|
||||
create table t(a Int64, b Int64) engine = Memory;
|
||||
create table s(a Int64, b Int64) engine = Memory;
|
||||
|
||||
insert into t values(1,1);
|
||||
insert into t values(2,2);
|
||||
insert into s values(1,1);
|
||||
|
||||
select 'join_use_nulls = 1';
|
||||
set join_use_nulls = 1;
|
||||
select * from t left outer join s using (a,b) order by t.a;
|
||||
select '-';
|
||||
select * from t join s using (a,b);
|
||||
select '-';
|
||||
select * from t join s on (t.a=s.a and t.b=s.b);
|
||||
select '-';
|
||||
select t.* from t left join s on (t.a=s.a and t.b=s.b) order by t.a;
|
||||
select '-';
|
||||
-- select t.*, s.* from t left join s on (t.a=s.a and t.b=s.b); -- TODO
|
||||
select '-';
|
||||
-- select t.*, s.* from t left join s on (s.a=t.a and t.b=s.b); -- TODO
|
||||
select '-';
|
||||
select t.*, s.* from t right join s on (t.a=s.a and t.b=s.b);
|
||||
select '-';
|
||||
-- select * from t left outer join s using (a,b) where s.a is null; -- TODO
|
||||
select '-';
|
||||
-- select * from t left outer join s on (t.a=s.a and t.b=s.b) where s.a is null; -- TODO
|
||||
select '-';
|
||||
-- select t.*, s.* from t left join s on (s.a=t.a and t.b=s.b and t.a=toInt64(2)) order by t.a; -- TODO
|
||||
select '-';
|
||||
-- select t.*, s.* from t left join s on (s.a=t.a); -- TODO
|
||||
select '-';
|
||||
select t.*, s.* from t left join s on (t.b=toInt64(2) and s.a=t.a) where s.b=2;
|
||||
|
||||
select 'join_use_nulls = 0';
|
||||
set join_use_nulls = 0;
|
||||
select * from t left outer join s using (a,b) order by t.a;
|
||||
select '-';
|
||||
select * from t join s using (a,b);
|
||||
select '-';
|
||||
select * from t join s on (t.a=s.a and t.b=s.b);
|
||||
select '-';
|
||||
select t.* from t left join s on (t.a=s.a and t.b=s.b) order by t.a;
|
||||
select '-';
|
||||
select t.*, s.* from t left join s on (t.a=s.a and t.b=s.b) order by t.a;
|
||||
select '-';
|
||||
select t.*, s.* from t left join s on (s.a=t.a and t.b=s.b) order by t.a;
|
||||
select '-';
|
||||
select t.*, s.* from t right join s on (t.a=s.a and t.b=s.b);
|
||||
select '-';
|
||||
-- select * from t left outer join s using (a,b) where s.a is null; -- TODO
|
||||
select '-';
|
||||
-- select * from t left outer join s on (t.a=s.a and t.b=s.b) where s.a is null; -- TODO
|
||||
select '-';
|
||||
select t.*, s.* from t left join s on (s.a=t.a and t.b=s.b and t.a=toInt64(2)) order by t.a;
|
||||
select '-';
|
||||
select t.*, s.* from t left join s on (s.a=t.a) order by t.a;
|
||||
select '-';
|
||||
select t.*, s.* from t left join s on (t.b=toInt64(2) and s.a=t.a) where s.b=2;
|
||||
|
||||
drop table t;
|
||||
drop table s;
|
Loading…
Reference in New Issue
Block a user