-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dual merging in outer join queries #15959
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Manan Gupta <manan@planetscale.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15959 +/- ##
==========================================
- Coverage 68.47% 68.25% -0.22%
==========================================
Files 1562 1562
Lines 197052 197334 +282
==========================================
- Hits 134936 134697 -239
- Misses 62116 62637 +521 ☔ View full report in Codecov by Sentry. |
Is this not a problem only with left join and that too when the dual table is on the left hand side of the join. |
I see the code follows this rule, it was missing in the PR description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harshit-gangal @systay Had to change quite a few things to get everything to work. Could I request you two to review it again?
A lot of code has changed since the approval.
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
f0c6155
to
8d67079
Compare
@@ -2043,6 +2043,159 @@ | |||
] | |||
} | |||
}, | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: it'd be great to test these in an end to end test as well
Description
This PR resolves the issue described in #15958.
The problem was that we were merging the dual query with the sharded route, and each of the shards ended up returning one row. We should not be merging dual queries into sharded routes. We can only merge them if the other side is a single shard routing.
Related Issue(s)
Checklist
Deployment Notes