-
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 multi table update with non literal value #15980
Add support for multi table update with non literal value #15980
Conversation
Signed-off-by: Harshit Gangal <[email protected]>
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
|
Signed-off-by: Harshit Gangal <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15980 +/- ##
==========================================
+ Coverage 68.46% 68.48% +0.01%
==========================================
Files 1562 1562
Lines 197059 197154 +95
==========================================
+ Hits 134919 135016 +97
+ Misses 62140 62138 -2 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
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.
Rest LGTM
], | ||
"KsidLength": 1, | ||
"KsidVindex": "user_index", | ||
"OwnedVindexQuery": "select Id, `Name`, Costly, `user`.`name` = :ue_id + 'foo' from `user` where `user`.id in ::dml_vals for update", |
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.
I'm confused here. Why are we using user.id in ::dml_vals
when we have the :ue_id
parameter available. ::dml_vals
will only contain a single value here, right?
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.
This can be changed from list argument to single argument.
It is not a problem as-is. Definitely, this can be changed
Signed-off-by: Harshit Gangal <[email protected]>
Description
This PR adds support for multi table update with update expression having dependency from multiple tables.
e.g.
update t1, t2 set t1.col = t2.col + 2 where t1.id = t2.id and t1.foo = 2;
Here, update of
t1.col
is dependent on value of t2's table colRelated Issue(s)
Checklist