This commit is contained in:
Nikita Taranov 2024-11-17 16:28:46 +01:00
parent 204f723638
commit 4725ef2f74

View File

@ -229,30 +229,34 @@ sub2 as (select y, z from tab2 where y != 4),
sub3 as (select l.x, l.y, r.y, r.z as z from sub2 r any right join sub1 l on l.y = r.y),
sub4 as (select z, a from tab3 where z != 8),
sub5 as (select x, l.y, y, z, rr.z, a from sub3 ll any left join sub4 rr on ll.z = rr.z)
select * from sub5;
select * from sub5 order by all;
0 0 0 0 0 0
6 6 6 6 0 0
8 8 8 8 0 0
10 10 10 10 0 0
12 12 12 12 12 12
14 14 14 14 0 0
4 4 0 0 0 0
3 3 0 0 0 0
5 5 0 0 0 0
1 1 0 0 0 0
3 3 0 0 0 0
4 4 0 0 0 0
5 5 0 0 0 0
6 6 6 6 0 0
7 7 0 0 0 0
8 8 8 8 0 0
9 9 0 0 0 0
15 15 0 0 0 0
10 10 10 10 0 0
11 11 0 0 0 0
12 12 12 12 12 12
13 13 0 0 0 0
14 14 14 14 0 0
15 15 0 0 0 0
explain description=0
with sub1 as (select x, y from tab1 where x != 2),
sub2 as (select y, z from tab2 where y != 4),
sub3 as (select l.x, l.y, r.y, r.z as z from sub2 r any right join sub1 l on l.y = r.y),
sub4 as (select z, a from tab3 where z != 8),
sub5 as (select x, l.y, y, z, rr.z, a from sub3 ll any left join sub4 rr on ll.z = rr.z)
select * from sub5;
select * from sub5 order by all;
Expression
Sorting
Union
Expression
Sorting
Expression
Join
Expression
@ -664,30 +668,34 @@ sub2 as (select y, z from tab2 where y != 4),
sub3 as (select l.x, l.y, r.y, r.z as z from sub2 r any right join sub1 l on l.y = r.y),
sub4 as (select z, a from tab3 where z != 8),
sub5 as (select x, l.y, y, z, rr.z, a from sub3 ll any left join sub4 rr on ll.z = rr.z)
select * from sub5;
select * from sub5 order by all;
0 0 0 0 0 0
6 6 6 6 0 0
8 8 8 8 0 0
10 10 10 10 0 0
12 12 12 12 12 12
14 14 14 14 0 0
4 4 0 0 0 0
3 3 0 0 0 0
5 5 0 0 0 0
1 1 0 0 0 0
3 3 0 0 0 0
4 4 0 0 0 0
5 5 0 0 0 0
6 6 6 6 0 0
7 7 0 0 0 0
8 8 8 8 0 0
9 9 0 0 0 0
15 15 0 0 0 0
10 10 10 10 0 0
11 11 0 0 0 0
12 12 12 12 12 12
13 13 0 0 0 0
14 14 14 14 0 0
15 15 0 0 0 0
explain description=0
with sub1 as (select x, y from tab1 where x != 2),
sub2 as (select y, z from tab2 where y != 4),
sub3 as (select l.x, l.y, r.y, r.z as z from sub2 r any right join sub1 l on l.y = r.y),
sub4 as (select z, a from tab3 where z != 8),
sub5 as (select x, l.y, y, z, rr.z, a from sub3 ll any left join sub4 rr on ll.z = rr.z)
select * from sub5;
select * from sub5 order by all;
Expression
Sorting
Union
Expression
Sorting
Expression
Join
Expression