Merged
Conversation
cf8eb1e to
1a2968b
Compare
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
1a2968b to
c4658bf
Compare
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
sougou
approved these changes
Mar 30, 2020
Contributor
sougou
left a comment
There was a problem hiding this comment.
Some nits that you can fix forward.
| var _ Primitive = (*Send)(nil) | ||
|
|
||
| // Send is an operator to send query to the specific keyspace, tabletType and destination | ||
| type Send struct { |
Contributor
There was a problem hiding this comment.
I'd recommend a custom JSON marshaller that emits an additional fake "Opcode": "Send", which will make the output plan more readable (look at engine/limit.go).
|
|
||
| // GetFields implements Primitive interface | ||
| func (s *Send) GetFields(vcursor VCursor, bindVars map[string]*query.BindVariable) (*sqltypes.Result, error) { | ||
| return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "not reachable") // TODO: systay - @sugu, is this correct? |
Contributor
There was a problem hiding this comment.
Correct for now. We have to watch out if/when we allow these primitives to become composable.
|
|
||
| // Send is an operator to send query to the specific keyspace, tabletType and destination | ||
| type Send struct { | ||
| // Keyspace specifies the keyspace to send the query to. |
Contributor
There was a problem hiding this comment.
I also see that Send is mostly a subset of Route, but it's good to keep it separate for now.
| } | ||
| func (e *Executor) handleExec(ctx context.Context, safeSession *SafeSession, sql string, bindVars map[string]*querypb.BindVariable, logStats *LogStats, stmtType sqlparser.StatementType) (*sqltypes.Result, error) { | ||
|
|
||
| // V3 mode. |
| } | ||
| } | ||
|
|
||
| //TODO - what about these? |
Merged
dweitzman
added a commit
to dweitzman/vitess
that referenced
this pull request
Apr 17, 2020
In vitessio#5982 queries after `use keyspace[shard]` were changed to use a new "Send" engine primitive instead of v2 routing, which caused OLAP to stop working for queries targeted in that way. This PR fixes those OLAP queries. This PR does not implement GetFields, so prepared statements still aren't going to work with this kind of targeting. As a bonus this also fixes an issue where trying to start/rollback/commit a transaction in OLAP mode caused a panic due to plan.Instructions being nil in that case. Signed-off-by: David Weitzman <dweitzman@pinterest.com>
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.
Removed usage of resolver in handleExec by using bypass plan.