Class ReplaceRedundantJoinWithSource

java.lang.Object
io.trino.sql.planner.iterative.rule.ReplaceRedundantJoinWithSource
All Implemented Interfaces:
Rule<JoinNode>

public class ReplaceRedundantJoinWithSource extends Object implements Rule<JoinNode>
This rule transforms plans with joins, where: - one of the sources is scalar and produces no output symbols. In case of LEFT or RIGHT join, it has to be the inner source. In case of FULL or INNER join, it can be either source. - the other join source is at least scalar (not known to be empty).

The join is replaced with the other source and an optional pruning projection.

Note: This rule does not transform plans where either join source is empty. Such plans are transformed by RemoveRedundantJoin and ReplaceRedundantJoinWithProject rules.