vitess icon indicating copy to clipboard operation
vitess copied to clipboard

Feature Request: Updating can get the updated value

Open Kean9527 opened this issue 2 years ago • 3 comments

Feature Description

In many cases, we want to get the updated value about a column, mysql can use sql like this: UPDATE account.t_user_bill SET diamonds = @value := diamonds + ? WHERE uid = ? But now vitess just don't support this, Can we plan to it?

Use Case(s)

updating a column and get the updated value

Kean9527 avatar Jul 20 '22 04:07 Kean9527

@GuptaManan100 is that something that we plan on supporting in the SQL parser?

frouioui avatar Jul 20 '22 17:07 frouioui

@Kean9527 @frouioui We don't support this currently, but we would like to. I'll add this to the issue tracking parsing support.

GuptaManan100 avatar Jul 21 '22 05:07 GuptaManan100

Hey there! I'd like to pick this issue up

AllMight2099 avatar Aug 10 '22 21:08 AllMight2099

@AllMight2099 sure, go right ahead.

GuptaManan100 avatar Aug 18 '22 05:08 GuptaManan100

Parsing support was added in #13032, but that itself isn't enough to support the query. The planner currently rejects this expression explicitly.

GuptaManan100 avatar May 11 '23 05:05 GuptaManan100