Replaces logical Intersect operator with a left-semi Join operator.
SELECT a1, a2 FROM Tab1 INTERSECT SELECT b1, b2 FROM Tab2
==> SELECT DISTINCT a1, a2 FROM Tab1 LEFT SEMI JOIN Tab2 ON a1<=>b1 AND a2<=>b2
Note:
1. This rule is only applicable to INTERSECT DISTINCT. Do not use it for INTERSECT ALL.
2. This rule has to be done after de-duplicating the attributes; otherwise, the generated
join conditions will be incorrect.
Replaces logical Intersect operator with a left-semi Join operator.
Note: 1. This rule is only applicable to INTERSECT DISTINCT. Do not use it for INTERSECT ALL. 2. This rule has to be done after de-duplicating the attributes; otherwise, the generated join conditions will be incorrect.