noisepage
noisepage copied to clipboard
Joins With a 1=1 Predicate Fail In the Optimizer
It looks like simple joins with 1=1 as the predicate fail in the optimizer.
The following traces produce a null access on gexpr
here.
create table sample (x integer);
create table other (x integer);
select * from sample left outer join other on 1=1;
(fail)
select * from (select 2 as x) p left outer join (select 2 as y) q on 1=1;
(fail)
select * from (select 2) p left outer join (select 2 ) q on 1=1;
The following traces loop endlessly in the optimizer:
select * from (select 2) p inner join (select 2) q on 1=1;
bruh this is exactly what i've been saying all along. we don't want ANY nullbois on gexpr
goons. would be real bigtime neat if we got this going on. ill call my guy