Class JoinToCorrelateRule

All Implemented Interfaces:
TransformationRule

@Enclosing public class JoinToCorrelateRule extends RelRule<JoinToCorrelateRule.Config> implements TransformationRule
Rule that converts a Join into a LogicalCorrelate, which can then be implemented using nested loops.

For example,

select * from emp join dept on emp.deptno = dept.deptno

becomes a Correlator which restarts LogicalTableScan("DEPT") for each row read from LogicalTableScan("EMP").

This rule is not applicable if for certain types of outer join. For example,

select * from emp right join dept on emp.deptno = dept.deptno

would require emitting a NULL emp row if a certain department contained no employees, and Correlator cannot do that.

See Also: