-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
executor: Fix pessimistic lock doesn't work on the partition table for subquery/joins #21641
Conversation
PTAL @crazycs520 @tiancaiamao |
executor/executor.go
Outdated
return errors.Trace(errors.Errorf("Cannot get schema info for table %s", tblInfo.Name.O)) | ||
} | ||
colNamePrefix := fmt.Sprintf("%s.%s.", dbInfo.Name.L, tblInfo.Name.L) | ||
cols := pt.Cols() |
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.
Do we need to use VisibleCols
instead of Cols
? @bb7133
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.
Yes, I think so.
/run-all-tests |
What's the status of this PR? @blacktear23 |
@youjiali1995 Still active, waiting for review. |
@bb7133 @lzmhhh123 PTAL |
Fix #20028 |
LGTM |
What problem does this PR solve?
Issue Number: close #21618, close #21509
Problem Summary:
In
SelectLockExec.Next
the second parameter forGetPartitionByRow
function is not contains only partitioned table's columns data, it is all selected table's result. So it will return wrong partition table ID.What is changed and how it works?
What's Changed:
Add a projection step to filter row data to partitioned table related Datum array, then call
GetPartitionByRow
function.Related changes
Check List
Tests
Side effects
Release note