one more test

This commit is contained in:
chertus 2019-02-20 18:47:38 +03:00
parent 1f2a5f9a91
commit 116574288f
2 changed files with 10 additions and 8 deletions

View File

@ -2,13 +2,12 @@
6 60 600
12 120 1200
18 180 1800
-
0 0 0
10 100 1000
20 200 2000
-
0 0 0
-
┌─--t1.a─┬─--t2.a─┬─--t2.b─┬─--t3.b─┬─--t3.c─┬─a─┬─b─┬─c─┐
│ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │
└────────┴────────┴────────┴────────┴────────┴───┴───┴───┘
0 0 0 0
6 6 60 60
12 12 120 120

View File

@ -18,11 +18,14 @@ INSERT INTO table5 SELECT number * 5, number * 50, number * 500 FROM numbers(10)
SET allow_experimental_multiple_joins_emulation = 1;
select t1.a, t2.b, t3.c from table1 as t1 join table2 as t2 on t1.a = t2.a join table3 as t3 on t2.b = t3.b;
select '-';
select t1.a, t2.b, t5.c from table1 as t1 join table2 as t2 on t1.a = t2.a join table5 as t5 on t1.a = t5.a AND t2.b = t5.b;
select '-';
select t1.a, t2.b, t3.c from table1 as t1 join table2 as t2 on t1.a = t2.a join table3 as t3 on t2.b = t3.b join table5 as t5 on t3.c = t5.c;
select '-';
select t1.a, t2.a, t2.b, t3.b, t3.c, t5.a, t5.b, t5.c
from table1 as t1
join table2 as t2 on t1.a = t2.a
join table3 as t3 on t2.b = t3.b
join table5 as t5 on t3.c = t5.c
FORMAT PrettyCompactNoEscapes;
select t1.a as t1_a, t2.a as t2_a, t2.b as t2_b, t3.b as t3_b
from table1 as t1