mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
dbms: JOINs: more tests [#METR-11370].
This commit is contained in:
parent
4645131f7a
commit
a83915b62c
15
dbms/tests/queries/0_stateless/00054_join_string.reference
Normal file
15
dbms/tests/queries/0_stateless/00054_join_string.reference
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
A 0
|
||||||
|
A 1
|
||||||
|
B 2
|
||||||
|
B 3
|
||||||
|
C 4
|
||||||
|
C 5
|
||||||
|
D 6
|
||||||
|
D 7
|
||||||
|
E 8
|
||||||
|
E 9
|
||||||
|
F 0
|
||||||
|
G 0
|
||||||
|
H 0
|
||||||
|
I 0
|
||||||
|
J 0
|
9
dbms/tests/queries/0_stateless/00054_join_string.sql
Normal file
9
dbms/tests/queries/0_stateless/00054_join_string.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
SELECT *, joined FROM
|
||||||
|
(
|
||||||
|
SELECT reinterpretAsString(number + reinterpretAsUInt8('A')) AS k FROM system.numbers LIMIT 10
|
||||||
|
)
|
||||||
|
ALL LEFT JOIN
|
||||||
|
(
|
||||||
|
SELECT reinterpretAsString(intDiv(number, 2) + reinterpretAsUInt8('A')) AS k, number AS joined FROM system.numbers LIMIT 10
|
||||||
|
)
|
||||||
|
USING k;
|
@ -0,0 +1,13 @@
|
|||||||
|
0 0
|
||||||
|
0 6
|
||||||
|
1 1
|
||||||
|
1 7
|
||||||
|
2 0
|
||||||
|
3 0
|
||||||
|
4 0
|
||||||
|
5 0
|
||||||
|
6 0
|
||||||
|
7 0
|
||||||
|
8 2
|
||||||
|
8 8
|
||||||
|
9 0
|
@ -0,0 +1,9 @@
|
|||||||
|
SELECT left, right FROM
|
||||||
|
(
|
||||||
|
SELECT number % 4 AS k1, number % 3 AS k2, number AS left FROM system.numbers LIMIT 10
|
||||||
|
)
|
||||||
|
ALL LEFT JOIN
|
||||||
|
(
|
||||||
|
SELECT number % 2 AS k1, number % 6 AS k2, number AS right FROM system.numbers LIMIT 10
|
||||||
|
)
|
||||||
|
USING k1, k2;
|
@ -0,0 +1,13 @@
|
|||||||
|
0 0
|
||||||
|
0 6
|
||||||
|
1 1
|
||||||
|
1 7
|
||||||
|
2 0
|
||||||
|
3 0
|
||||||
|
4 0
|
||||||
|
5 0
|
||||||
|
6 0
|
||||||
|
7 0
|
||||||
|
8 2
|
||||||
|
8 8
|
||||||
|
9 0
|
@ -0,0 +1,9 @@
|
|||||||
|
SELECT left, right FROM
|
||||||
|
(
|
||||||
|
SELECT number % 4 AS k1, toString(number % 3) AS k2, number AS left FROM system.numbers LIMIT 10
|
||||||
|
)
|
||||||
|
ALL LEFT JOIN
|
||||||
|
(
|
||||||
|
SELECT number % 2 AS k1, toString(number % 6) AS k2, number AS right FROM system.numbers LIMIT 10
|
||||||
|
)
|
||||||
|
USING k1, k2;
|
Loading…
Reference in New Issue
Block a user