Skip to content
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

Support UPDATE IGNORE #1135

Merged
merged 11 commits into from
Aug 2, 2022
Merged

Support UPDATE IGNORE #1135

merged 11 commits into from
Aug 2, 2022

Conversation

VinaiRachakonda
Copy link
Contributor

@VinaiRachakonda VinaiRachakonda commented Jul 28, 2022

This pul request implements UPDATE IGNORE behavior. CC:

@@ -67,9 +67,9 @@ func (s *SetField) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
if err != nil {
// Fill in error with information
if sql.ErrLengthBeyondLimit.Is(err) {
return nil, sql.ErrLengthBeyondLimit.New(val, getField.Name())
return nil, sql.NewWrappedTypeConversionError(val, getField.fieldIndex, sql.ErrLengthBeyondLimit.New(val, getField.Name()))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can this break?

@@ -102,7 +105,14 @@ func (u *updateSourceIter) Next(ctx *sql.Context) (sql.Row, error) {

newRow, err := applyUpdateExpressions(ctx, u.updateExprs, oldRow)
if err != nil {
return nil, err
wtce, ok := err.(sql.WrappedTypeConversionError)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can likely infer or simplify here

@VinaiRachakonda VinaiRachakonda changed the title [WIP] Support UPDATE IGNORE Support UPDATE IGNORE Jul 28, 2022
Copy link
Contributor

@druvv druvv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VinaiRachakonda VinaiRachakonda merged commit 2a7d7d5 into main Aug 2, 2022
@Hydrocharged Hydrocharged deleted the vinai/update-ignore branch October 13, 2022 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants