-
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
dml: fix index column offset beyond the range #25699
Conversation
Signed-off-by: ailinkid <314806019@qq.com>
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.
It seems that this PR will revert #17048
Yes, kind of, 17048's target test has worked under the latter fix of jiwei's use of |
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.
So could we remove FullHiddenColsAndVisibleCols
?
planner/core/logical_plan_builder.go
Outdated
@@ -3903,7 +3903,7 @@ func (b *PlanBuilder) buildDataSource(ctx context.Context, tn *ast.TableName, as | |||
columns = tbl.WritableCols() | |||
} else if b.inDeleteStmt { | |||
// All hidden columns are needed because we need to delete the expression index that consists of hidden columns. |
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.
We need to update this comment.
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.
FullHiddenColsAndVisibleCols() is useful and depended in the case of partion prune, so I keeped it.
func (s *partitionProcessor) reconstructTableColNames(ds *DataSource) ([]*types.FieldName, error) {
names := make([]*types.FieldName, 0, len(ds.TblCols))
colsInfo := ds.table.FullHiddenColsAndVisibleCols()
colsInfoMap := make(map[int64]*table.Column, len(colsInfo))
for _, c := range colsInfo {
colsInfoMap[c.ID] = c
}
...
Signed-off-by: ailinkid <314806019@qq.com>
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.
LGTM
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 130165d
|
/merge |
Signed-off-by: ailinkid 314806019@qq.com
What problem does this PR solve?
Issue Number: close #25342
What is changed and how it works?
Make the DELETE statement aware of middle state column, while user can't see them yet (non-explicit usage).
(some indexes convering the dropping-column need check the middle state column to remove the index record)
Check List
Tests
Release note