mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Updated test for JOIN ON syntax. [#CLICKHOUSE-3761]
This commit is contained in:
parent
6b3375393d
commit
fce3bc193b
@ -51,3 +51,23 @@ duplicate column names
|
||||
{"a1":1,"copy.a1":2}
|
||||
{"a1":1,"copy.a1":2}
|
||||
{"a1":1,"copy.a1":2}
|
||||
subquery
|
||||
1
|
||||
1
|
||||
1 2
|
||||
1 2 2 3
|
||||
1 2
|
||||
subquery expression
|
||||
2
|
||||
1 2 2 3
|
||||
1 2 2
|
||||
subquery column alias
|
||||
1 2 2 3
|
||||
1 2 2 3
|
||||
1 2 2 3
|
||||
subquery alias
|
||||
1 2 2 3
|
||||
1 2 2 3
|
||||
1 2 2 3
|
||||
1 2 2 3
|
||||
{"a1":1,"s.a1":2}
|
||||
|
@ -82,3 +82,26 @@ select a1, copy.a1 from test.tab1 any left join test.tab1_copy copy on tab1.b1 +
|
||||
select a1, tab1_copy.a1 from test.tab1 any left join test.tab1_copy copy on tab1.b1 + 3 = b1 + 2 FORMAT JSONEachRow;
|
||||
select a1, test.tab1_copy.a1 from test.tab1 any left join test.tab1_copy copy on tab1.b1 + 3 = b1 + 2 FORMAT JSONEachRow;
|
||||
|
||||
select 'subquery';
|
||||
select a1 from test.tab1 any left join (select * from test.tab2) on b1 = a2;
|
||||
select a1 from test.tab1 any left join (select a2 from test.tab2) on b1 = a2;
|
||||
select a1, b1 from test.tab1 any left join (select * from test.tab2) on b1 = a2;
|
||||
select a1, b1, a2, b2 from test.tab1 any left join (select * from test.tab2) on b1 = a2;
|
||||
select a1, a2 from test.tab1 any left join (select a2 from test.tab2) on b1 = a2;
|
||||
|
||||
select 'subquery expression';
|
||||
select b1 from test.tab1 any left join (select * from test.tab2) on toInt32(a1 + 1) = a2;
|
||||
select a1, b1, a2, b2 from test.tab1 any left join (select * from test.tab2) on b1 + 1 = a2 + 1;
|
||||
select a1, b1, a2 from test.tab1 any left join (select * from test.tab2) on b1 + 1 = a2 + 1;
|
||||
|
||||
select 'subquery column alias';
|
||||
select a1, b1, a2, b2 from test.tab1 any left join (select *, a2 as z from test.tab2) on b1 + 1 = z + 1;
|
||||
select a1, b1, a2, b2 from test.tab1 any left join (select *, a2 + 1 as z from test.tab2) on b1 + 1 = z;
|
||||
select a1, b1, a2, b2 from test.tab1 any left join (select *, a2 + 1 as z from test.tab2) on b1 + 2 = z + 1 format TSV;
|
||||
|
||||
select 'subquery alias';
|
||||
select a1, a2, b1, b2 from test.tab1 first any left join (select * from test.tab2) second on first.b1 = second.a2;
|
||||
select a1, a2, b1, b2 from test.tab1 first any left join (select *, a2 as z from test.tab2) second on first.b1 = second.z;
|
||||
select a1, a2, b1, b2 from test.tab1 first any left join (select *, a2 + 1 as z from test.tab2) second on first.b1 + 1 = second.z;
|
||||
select tab1.a1, a2, test.tab1.b1, second.b2 from test.tab1 first any left join (select * from test.tab2) second on first.b1 = second.a2;
|
||||
select a1, s.a1 from test.tab1 any left join (select * from test.tab1_copy) s on tab1.b1 + 3 = b1 + 2 FORMAT JSONEachRow;
|
||||
|
Loading…
Reference in New Issue
Block a user