Skip to content

fix: don't needlessly contrain join when the left side is allow to be null#60970

Open
icewind1991 wants to merge 1 commit into
masterfrom
partition-query-allow-null
Open

fix: don't needlessly contrain join when the left side is allow to be null#60970
icewind1991 wants to merge 1 commit into
masterfrom
partition-query-allow-null

Conversation

@icewind1991
Copy link
Copy Markdown
Member

Summary

Currently, the left side of a LEFT JOIN is constrained, we implicitly transform it into an INNER JOIN. With the reasoning being that a row needs to exist to satisfy the constraint.
However, the constrain might still allow unset rows by allowing null values in the constraint. For example in: RuleManager::getRulesForFilesByParent

This changes it to only do the transform to INNER JOIN if the constraint doesn't allow null rows.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@icewind1991 icewind1991 added this to the Nextcloud 34 milestone Jun 3, 2026
@icewind1991 icewind1991 requested a review from a team as a code owner June 3, 2026 16:08
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Jun 3, 2026
@icewind1991 icewind1991 requested review from Altahrim, CarlSchwan, leftybournes and salmart-dev and removed request for a team June 3, 2026 16:08
… null

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 force-pushed the partition-query-allow-null branch from 515952a to b0a49e3 Compare June 3, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant