Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
To reproduce the issue, run the following sql++ statements:
drop dataverse sampdb if exists; create dataverse sampdb; use sampdb; drop dataset samptable if exists; drop type samptabletype if exists; create type samptabletype as closed { id: int8 }; create dataset samptable1(samptabletype) primary key id; insert into samptable1 ({'id' : 1}); insert into samptable1 ({'id' : 2}); insert into samptable1 ({'id' : 3}); create dataset samptable2(samptabletype) primary key id; insert into samptable2 ({'id' : 1}); insert into samptable2 ({'id' : 2}); insert into samptable2 ({'id' : 3}); drop dataset jointable if exists; drop type jointabletype if exists; create type jointabletype as closed { id: int8 }; create dataset jointable(jointabletype) primary key id; insert into jointable ({'id' : 0}); insert into jointable ({'id' : 1}); with samptab1 as ( select id from samptable1 ), samptab2 as ( select id from samptable2 ) select * from jointable as jt1 left outer join samptab1 as st1 on jt1.id = 0 left outer join samptab2 as st2 on jt1.id = 1 or st1.id = st2.id left outer join samptab1 as st12 on jt1.id = 1 or st12.id = st2.id;
Please see the attached logs