-
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
statistics: add some test cases of global-stats to cover more column types #23138
Conversation
/rebuild |
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.
rest LGTM
@@ -1831,7 +1831,11 @@ func MergePartitionHist2GlobalHist(sc *stmtctx.StatementContext, hists []*Histog | |||
d.SetBytes(meta.Encoded) | |||
} else { | |||
var err error | |||
_, d, err = codec.DecodeOne(meta.Encoded) | |||
if types.IsTypeTime(hists[0].Tp.Tp) { |
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.
Maybe we need to add some comments here.
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.
Some comments have been added, PTAL @rebelice .
@@ -748,7 +748,7 @@ func DecodeRange(b []byte, size int, idxColumnTypes []byte, loc *time.Location) | |||
if i >= len(idxColumnTypes) { | |||
return values, b, errors.New("invalid length of index's columns") | |||
} | |||
if idxColumnTypes[i] == mysql.TypeDatetime || idxColumnTypes[i] == mysql.TypeTimestamp || idxColumnTypes[i] == mysql.TypeDate { | |||
if types.IsTypeTime(idxColumnTypes[i]) { |
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.
ditto
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 writing |
/run-all-tests |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: ea9344a
|
/run-all-tests |
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary: statistics: add some test cases of global-stats to cover more column types
What is changed and how it works?
statistics: add some test cases of global-stats to cover more column types
Check List
Tests
Release note