xngin
xngin copied to clipboard
Enhance optimization of rule to convert outerjoin to antijoin
SELECT c1 FROM t1
LEFT JOIN t2
ON t1.c1 = t2.c2
WHERE t2.c2 IS NULL
Above SQL uses LeftJoin to achieve the AntiJoin Semantics. We remove the WHERE clause and convert it to AntiJoin.