Skip to main content

Module join_condition_simplify

Module join_condition_simplify 

Source
Expand description

Rules for simplifying JOIN conditions

This rule simplifies JOIN conditions, including eliminating redundant conditions and converting InnerJoin with ON true to CrossJoin.

§Conversion examples

§Eliminate redundant conditions

Before:

  InnerJoin ON a.id = b.id AND b.id = a.id

After:

  InnerJoin ON a.id = b.id

§Convert ON true to CrossJoin

Before:

  InnerJoin ON true

After:

  CrossJoin

§Applicable Conditions

JOIN conditions contain redundant expressions. JOIN condition is a constant true. JOIN conditions can be simplified.

Structs§

JoinConditionSimplifyRule
Rules for simplifying JOIN conditions