Skip to content

optimize outer to inner join to allow filter pushdown - #7705

Open
mccanne wants to merge 2 commits into
mainfrom
left-to-inner-join-opt
Open

mccanne wants to merge 2 commits into
mainfrom
left-to-inner-join-opt

Conversation

@mccanne

@mccanne mccanne commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Turn an outer join into an inner join when the filter after it can never be true for an unmatched value
(e.g., LEFT JOIN p … WHERE p.color='red'), so the filter is pushed down again as it was before #7703. Filters that can be true for unmatched values, like IS NULL or OR, keep the outer join, and paths read with ?. convert only for == since none compares unequal to other values.

Adds compiler/ztests/join-outer-to-inner.yaml.

Turn an outer join into an inner join when the filter after
it can never be true for an unmatched value
(e.g., LEFT JOIN p … WHERE p.color='red'), so the filter is
pushed down again as it was before #7703. Filters that can be
true for unmatched values, like IS NULL or OR, keep the outer join,
and paths read with ?. convert only for == <literal> since none
compares unequal to other values.

Adds compiler/ztests/join-outer-to-inner.yaml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant