-
-
Notifications
You must be signed in to change notification settings - Fork 128
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(optimizer): Avoid extra queries for prefetches with existing prefetch hints #582
Conversation
Reviewer's Guide by SourceryThis pull request addresses issue #559 by adding a new test to ensure that prefetch hints with fields having the same name as the model do not cause extra database queries. The optimizer was modified to skip optimization when File-Level Changes
Tips
|
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.
Hey @bellini666 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 5 issues found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #582 +/- ##
==========================================
- Coverage 88.90% 88.79% -0.11%
==========================================
Files 41 41
Lines 3595 3598 +3
==========================================
- Hits 3196 3195 -1
- Misses 399 403 +4 ☔ View full report in Codecov by Sentry. |
b996269
to
f422a46
Compare
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
c1ff7ee
to
eedbdcb
Compare
for more information, see https://pre-commit.ci
Fix #559
Summary by Sourcery
This pull request addresses a bug where prefetching with existing prefetch hints resulted in extra database queries. It includes a new test to verify the fix and updates the optimizer to skip unnecessary optimizations in such cases.