-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
*: fix bugs that creating index on clustered index table or table with the virtual generated column #18114
*: fix bugs that creating index on clustered index table or table with the virtual generated column #18114
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18114 +/- ##
===========================================
Coverage 79.9567% 79.9567%
===========================================
Files 526 526
Lines 145535 145535
===========================================
Hits 116365 116365
Misses 20000 20000
Partials 9170 9170 |
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
…ster_virtual_index
7582e43
to
500ee76
Compare
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
/label LGT1 |
/unlabel LGT1 |
util/rowDecoder/decoder.go
Outdated
return row, nil | ||
} | ||
|
||
pkCols := tables.TryGetCommonPkColumnIds(tbl) |
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.
The RowDecoder already has a table field, we show create pkCols in NewRowDecoder.
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
util/rowDecoder/decoder.go
Outdated
// DecodeAndEvalRowWithMap decodes a byte slice into datums and evaluates the generated column value. | ||
func (rd *RowDecoder) DecodeAndEvalRowWithMap(ctx sessionctx.Context, handle kv.Handle, b []byte, decodeLoc, sysLoc *time.Location, row map[int64]types.Datum) (map[int64]types.Datum, error) { | ||
func (rd *RowDecoder) DecodeAndEvalRowWithMap(ctx sessionctx.Context, handle kv.Handle, b []byte, decodeLoc, sysLoc *time.Location, row map[int64]types.Datum, tbl *model.TableInfo) (map[int64]types.Datum, error) { |
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.
The tbl
arg can be removed.
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
LGTM |
4ae9899
to
179b8f1
Compare
/merge |
/run-all-tests |
@wjhuang2016 merge failed. |
/merge |
/run-all-tests |
@wjhuang2016 merge failed. |
What problem does this PR solve?
Issue Number: close #18061
Problem Summary:
I wrongly remove the handle's decode logic in #18045.
Anyway, the previously handle's decode logic didn't consider common handle, it's not completely correct.
What is changed and how it works?
DecodeAndEvalRowWithMap()
and implement the common handle part.decodeOldRowValToChunk()
, point_get.goDecodeAndEvalRowWithMap()
, do it inDecodeAndEvalRowWithMap()
.TryGetCommonPkColumnIds
andTryGetCommonPkColumns
.Related changes
Check List
Tests
Side effects
Release note