[release-17.0] fix: remove keyspace when merging subqueries (#16019)#16025
Closed
vitess-bot[bot] wants to merge 2 commits intorelease-17.0from
Closed
[release-17.0] fix: remove keyspace when merging subqueries (#16019)#16025vitess-bot[bot] wants to merge 2 commits intorelease-17.0from
vitess-bot[bot] wants to merge 2 commits intorelease-17.0from
Conversation
Contributor
Author
|
Hello @systay, there are conflicts in this backport. Please address them in order to merge this Pull Request. You can execute the snippet below to reset your branch and resolve the conflict manually. Make sure you replace |
Contributor
Author
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
|
…to remember to remove the keyspace from the query before adding the subquery to the outer query. Signed-off-by: Andres Taylor <andres@planetscale.com>
d479f4a to
b391a63
Compare
Collaborator
|
Had to do things differently in 17 since subqueries were handled very differently in this release |
harshit-gangal
approved these changes
Jun 4, 2024
Comment on lines
+849
to
+860
| { | ||
| "comment": "Merging subqueries should remove keyspace from query", | ||
| "query": "select u.id from user.user as u where not exists (select 1 from user.user_extra as ue where u.id = ue.user_id)", | ||
| "v3-plan": { | ||
| "QueryType": "SELECT", | ||
| "Original": "select u.id from user.user as u where not exists (select 1 from user.user_extra as ue where u.id = ue.user_id)", | ||
| "Instructions": { | ||
| "OperatorType": "Route", | ||
| "Variant": "Scatter", | ||
| "Keyspace": { | ||
| "Name": "user", | ||
| "Sharded": true |
Member
There was a problem hiding this comment.
add a test case when the subquery has a system table in it. That database qualifier should not be removed.
Signed-off-by: Andres Taylor <andres@planetscale.com>
Collaborator
|
Closing this just to minimize risk until someone reports that they are facing it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a backport of #16019