@@ -438,14 +438,16 @@ HAVING count(v) >= 1)`,
438
438
q : `SELECT * FROM xy WHERE (
439
439
EXISTS (SELECT * FROM xy Alias1 WHERE Alias1.x = (xy.x + 1))
440
440
AND EXISTS (SELECT * FROM uv Alias2 WHERE Alias2.u = (xy.x + 2)));` ,
441
- types : []plan.JoinType {plan .JoinTypeSemiLookup , plan .JoinTypeSemiLookup },
441
+ // These should both be JoinTypeSemiLookup, but for https://github.com/dolthub/go-mysql-server/issues/1893
442
+ types : []plan.JoinType {plan .JoinTypeSemiLookup , plan .JoinTypeMerge },
442
443
exp : []sql.Row {{0 , 2 }, {1 , 0 }},
443
444
},
444
445
{
445
446
q : `SELECT * FROM xy WHERE (
446
447
EXISTS (SELECT * FROM xy Alias1 WHERE Alias1.x = (xy.x + 1))
447
448
AND EXISTS (SELECT * FROM uv Alias1 WHERE Alias1.u = (xy.x + 2)));` ,
448
- types : []plan.JoinType {plan .JoinTypeSemiLookup , plan .JoinTypeSemiLookup },
449
+ // These should both be JoinTypeSemiLookup, but for https://github.com/dolthub/go-mysql-server/issues/1893
450
+ types : []plan.JoinType {plan .JoinTypeSemiLookup , plan .JoinTypeMerge },
449
451
exp : []sql.Row {{0 , 2 }, {1 , 0 }},
450
452
},
451
453
{
@@ -890,8 +892,9 @@ join uv d on d.u = c.x`,
890
892
order : []string {"a" , "b" , "c" , "d" },
891
893
},
892
894
{
893
- q : "select /*+ LOOKUP_JOIN(xy,scalarSubq0) */ 1 from xy where x not in (select u from uv)" ,
894
- types : []plan.JoinType {plan .JoinTypeLeftOuterLookup },
895
+ q : "select /*+ LOOKUP_JOIN(xy,scalarSubq0) */ 1 from xy where x not in (select u from uv)" ,
896
+ // This should be JoinTypeSemiLookup, but for https://github.com/dolthub/go-mysql-server/issues/1894
897
+ types : []plan.JoinType {plan .JoinTypeAntiLookup },
895
898
},
896
899
{
897
900
q : "select /*+ ANTI_JOIN(xy,scalarSubq0) */ 1 from xy where x not in (select u from uv)" ,
0 commit comments