-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add support for delete planning with limits in presence of foreign keys #15097
Conversation
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
|
The changes in this PR are based on top of #15081 and should be merged after it. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #15097 +/- ##
==========================================
- Coverage 47.80% 47.79% -0.02%
==========================================
Files 1155 1155
Lines 240308 240352 +44
==========================================
- Hits 114890 114868 -22
- Misses 116846 116911 +65
- Partials 8572 8573 +1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
f6171df
to
71fd0e4
Compare
delClone := ctx.SemTable.Clone(del).(*sqlparser.Delete) | ||
del.Limit = nil | ||
del.OrderBy = nil |
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.
is it expected to modify the original deletect by setting Limit
and OrderBy
to nil
?
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.
select has the limit and order by. original query is removed and a where condition is added to provide the values for it from the select
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Description
This PR makes the changes to support delete queries with limit along with foreign keys. After the changes in this PR, queries like the following now work -
Fuzzer tests for the same have been added and verified everything is working as intended.
Related Issue(s)
Checklist
Deployment Notes