Add order by to some join tests

This commit is contained in:
vdimir 2022-07-07 15:57:15 +00:00 committed by Vladimir C
parent af55f1c1e3
commit d636674a9e
3 changed files with 9 additions and 8 deletions

View File

@ -7,4 +7,4 @@ ALL INNER JOIN
SELECT intDiv(number, 2) AS k, number AS joined FROM system.numbers LIMIT 10
) AS b
USING k
ORDER BY k;
ORDER BY k, joined;

View File

@ -7,4 +7,5 @@ ALL LEFT JOIN
SELECT reinterpretAsString(intDiv(number, 2) + reinterpretAsUInt8('A')) AS k, number AS joined FROM system.numbers LIMIT 10
) js2
USING k
ORDER BY k;
ORDER BY k, joined
;

View File

@ -26,14 +26,14 @@ values ('1', 'John'), ('2', 'Jack'), ('3', 'Daniel'), ('4', 'James'), ('5', 'Ama
insert into children (id, childName)
values ('1', 'Robert'), ('1', 'Susan'), ('3', 'Sarah'), ('4', 'David'), ('4', 'Joseph'), ('5', 'Robert');
select * from persons all inner join children using id order by id;
select * from persons all inner join (select * from children) as j using id order by id;
select * from (select * from persons) as s all inner join (select * from children ) as j using id order by id;
select * from persons all inner join children using id order by id, name, childName;
select * from persons all inner join (select * from children) as j using id order by id, name, childName;
select * from (select * from persons) as s all inner join (select * from children ) as j using id order by id, name, childName;
--
set joined_subquery_requires_alias = 0;
select * from persons all inner join (select * from children) using id order by id;
select * from (select * from persons) all inner join (select * from children) using id order by id;
select * from (select * from persons) as s all inner join (select * from children) using id order by id;
select * from persons all inner join (select * from children) using id order by id, name, childName;
select * from (select * from persons) all inner join (select * from children) using id order by id, name, childName;
select * from (select * from persons) as s all inner join (select * from children) using id order by id, name, childName;
drop table persons;
drop table children;