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

statistics: add some test cases of global-stats to cover more column types #23138

Merged
merged 7 commits into from
Mar 8, 2021

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Mar 5, 2021

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

  • Unit test

Release note

  • statistics: add some test cases of global-stats to cover more column types

@qw4990 qw4990 requested review from rebelice and Reminiscent March 5, 2021 09:23
@qw4990 qw4990 requested a review from a team as a code owner March 5, 2021 09:23
@qw4990 qw4990 requested review from hanfei1991 and removed request for a team March 5, 2021 09:23
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 5, 2021
@qw4990
Copy link
Contributor Author

qw4990 commented Mar 5, 2021

/rebuild

@qw4990 qw4990 removed the request for review from hanfei1991 March 5, 2021 09:36
Copy link
Contributor

@rebelice rebelice left a 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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 8, 2021
Copy link
Contributor

@Reminiscent Reminiscent left a comment

Choose a reason for hiding this comment

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

/LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 8, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Reminiscent
  • rebelice

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 8, 2021
@qw4990
Copy link
Contributor Author

qw4990 commented Mar 8, 2021

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Mar 8, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: ea9344a

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 8, 2021
@qw4990
Copy link
Contributor Author

qw4990 commented Mar 8, 2021

/run-all-tests

@ti-chi-bot ti-chi-bot merged commit 31df40b into pingcap:master Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/statistics sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants