-
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
[Sqlparser] VALUES(...) should take a fully-qualified column name #3883
Conversation
More changes are needed. See the build failure :). |
Yep yep :) It's easier to punt these up here and have all the ci run than set it up locally :P |
fed5fbb
to
58bb282
Compare
Added a negative test (mistmatched table name) and rebased. |
LGTM |
Bump :) |
The ETA on this is probably weekend. I'll try to find time before if possible. |
bump :) |
I've started working my way through. I should get to this soon enough now. |
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.
@rafael Can you take a look at this? This code needs to be modified to accommodate your recent change for handling ondup constructs.
if !node.Name.Qualifier.IsEmpty() && node.Name.Qualifier != ins.Table { | ||
formatErr = vterrors.Errorf(vtrpcpb.Code_NOT_FOUND, | ||
"could not find qualified column %v in table %v", | ||
node.Name, ins.Table) |
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.
Use sqlparser.String(node.Name)
instead. It will make the error more readable. Same for table name.
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.
done, and updated tests.
58bb282
to
92e9dc0
Compare
@sougou - LGTM. @danieltahara - To make this change compatible with mine, I think you just need to change this:
to:
In: https://github.com/vitessio/vitess/blob/master/go/vt/vtgate/planbuilder/insert.go#L243 |
92e9dc0
to
3a6fd4e
Compare
fixed. :) |
A values expression is allowed to take a fully qualified (table.col), but the current parser only allows unqualified columns. I have modified the grammar, plan builder, and AST accordingly. Signed-off-by: Daniel Tahara <tahara@dropbox.com>
3a6fd4e
to
98e162a
Compare
…n VPlayer: support statement and transaction batching (vitessio#3883) * cherry pick of 14502 (vitessio#3881) Signed-off-by: Matt Lord <mattalord@gmail.com> * Corrections Signed-off-by: Matt Lord <mattalord@gmail.com> --------- Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
A values expression is allowed to take a fully qualified (table.col), but the current parser only allows unqualified columns. I have modified the grammar, plan builder, and AST accordingly.
Signed-off-by: Daniel Tahara tahara@dropbox.com