vtgate planbuilder: verify same vindex#4132
Merged
sougou merged 1 commit intovitessio:masterfrom Aug 14, 2018
sougou:vindex
Merged
vtgate planbuilder: verify same vindex#4132sougou merged 1 commit intovitessio:masterfrom sougou:vindex
sougou merged 1 commit intovitessio:masterfrom
sougou:vindex
Conversation
demmer
reviewed
Aug 14, 2018
go/vt/vtgate/planbuilder/route.go
Outdated
Member
There was a problem hiding this comment.
I actually feel like the previous error message was clearer since the case here isn't related to multiple shards per se (that's the latter case) but instead that the queries themselves aren't point queries.
How about "unsupported: UNION or subquery containing multi-shard queries"
demmer
approved these changes
Aug 14, 2018
Member
demmer
left a comment
There was a problem hiding this comment.
Minor suggestion but otherwise LGTM
When two parts of a query use the same unique vindex values, we also have to check that they use the same vindex. Otherwise, we end up merging queries that use different videxes but coincidentally have the same values. I've consolidated all places that perform this check and added the vindex check in that function. Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Contributor
Author
|
Comment addressed. |
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.
When two parts of a query use the same unique vindex
values, we also have to check that they use the same
vindex.
Otherwise, we end up merging queries that use different
videxes but coincidentally have the same values.
I've consolidated all places that perform this check
and added the vindex check in that function.
Signed-off-by: Sugu Sougoumarane ssougou@gmail.com