noisepage icon indicating copy to clipboard operation
noisepage copied to clipboard

Joins With a 1=1 Predicate Fail In the Optimizer

Open tanujnay112 opened this issue 4 years ago • 1 comments

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;

tanujnay112 avatar Nov 08 '20 07:11 tanujnay112

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 XpgonN0X

jasonbak avatar Jan 18 '21 01:01 jasonbak