Find cartesian joins
ProprietaryJoins that lack a real linking predicate multiply row counts instead of matching related rows: an ON condition comparing a column to itself is always true, and comma-separated tables with no WHERE predicate relating them pair every row with every row. Explicit CROSS JOIN and NATURAL joins are treated as intentional and are not flagged.
org. openrewrite. sql. antipattern. FindCartesianJoinOptional
markSourceBoolean
Whether to mark each occurrence in source, and apply the fix where the rule remediates. Defaults to true; set to false to leave source untouched and report only to the data table, as an analysis-only pipeline requires.
mod run . --recipe= org. openrewrite. sql. antipattern. FindCartesianJoinInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.