mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
dbms: JOINs: added tests [#METR-11370].
This commit is contained in:
parent
b970c85546
commit
7c0f53c34f
10
dbms/tests/queries/0_stateless/00050_any_left_join.reference
Normal file
10
dbms/tests/queries/0_stateless/00050_any_left_join.reference
Normal file
@ -0,0 +1,10 @@
|
||||
0 0
|
||||
1 0
|
||||
2 1
|
||||
3 0
|
||||
4 2
|
||||
5 0
|
||||
6 3
|
||||
7 0
|
||||
8 4
|
||||
9 0
|
9
dbms/tests/queries/0_stateless/00050_any_left_join.sql
Normal file
9
dbms/tests/queries/0_stateless/00050_any_left_join.sql
Normal file
@ -0,0 +1,9 @@
|
||||
SELECT *, joined FROM
|
||||
(
|
||||
SELECT number AS k FROM system.numbers LIMIT 10
|
||||
)
|
||||
ANY LEFT JOIN
|
||||
(
|
||||
SELECT number * 2 AS k, number AS joined FROM system.numbers LIMIT 10
|
||||
)
|
||||
USING k;
|
@ -0,0 +1,5 @@
|
||||
0 0
|
||||
2 1
|
||||
4 2
|
||||
6 3
|
||||
8 4
|
9
dbms/tests/queries/0_stateless/00051_any_inner_join.sql
Normal file
9
dbms/tests/queries/0_stateless/00051_any_inner_join.sql
Normal file
@ -0,0 +1,9 @@
|
||||
SELECT *, joined FROM
|
||||
(
|
||||
SELECT number AS k FROM system.numbers LIMIT 10
|
||||
)
|
||||
ANY INNER JOIN
|
||||
(
|
||||
SELECT number * 2 AS k, number AS joined FROM system.numbers LIMIT 10
|
||||
)
|
||||
USING k;
|
15
dbms/tests/queries/0_stateless/00052_all_left_join.reference
Normal file
15
dbms/tests/queries/0_stateless/00052_all_left_join.reference
Normal file
@ -0,0 +1,15 @@
|
||||
0 0
|
||||
0 1
|
||||
1 2
|
||||
1 3
|
||||
2 4
|
||||
2 5
|
||||
3 6
|
||||
3 7
|
||||
4 8
|
||||
4 9
|
||||
5 0
|
||||
6 0
|
||||
7 0
|
||||
8 0
|
||||
9 0
|
9
dbms/tests/queries/0_stateless/00052_all_left_join.sql
Normal file
9
dbms/tests/queries/0_stateless/00052_all_left_join.sql
Normal file
@ -0,0 +1,9 @@
|
||||
SELECT *, joined FROM
|
||||
(
|
||||
SELECT number AS k FROM system.numbers LIMIT 10
|
||||
)
|
||||
ALL LEFT JOIN
|
||||
(
|
||||
SELECT intDiv(number, 2) AS k, number AS joined FROM system.numbers LIMIT 10
|
||||
)
|
||||
USING k;
|
@ -0,0 +1,10 @@
|
||||
0 0
|
||||
0 1
|
||||
1 2
|
||||
1 3
|
||||
2 4
|
||||
2 5
|
||||
3 6
|
||||
3 7
|
||||
4 8
|
||||
4 9
|
9
dbms/tests/queries/0_stateless/00053_all_inner_join.sql
Normal file
9
dbms/tests/queries/0_stateless/00053_all_inner_join.sql
Normal file
@ -0,0 +1,9 @@
|
||||
SELECT *, joined FROM
|
||||
(
|
||||
SELECT number AS k FROM system.numbers LIMIT 10
|
||||
)
|
||||
ALL INNER JOIN
|
||||
(
|
||||
SELECT intDiv(number, 2) AS k, number AS joined FROM system.numbers LIMIT 10
|
||||
)
|
||||
USING k;
|
Loading…
Reference in New Issue
Block a user