planner: out of range for sampling | tidb-test=pr/2381
What problem does this PR solve?
Issue Number: close #55199
Problem Summary:
What changed and how does it work?
Sampling can result in values being missed for TopN and histogram bucket determination. While TopN may not be affected significantly, histogram bucket ranges will miss values if the aren't seen. This PR improves range estimation for searches that are at the lower or upper extreme of the valid ranges.
Check List
Tests
- [x] Unit test
- [ ] Integration test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test
- [ ] I checked and no code files have been changed.
Side effects
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [ ] Breaking backward compatibility
Documentation
- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Changes MySQL compatibility
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
None
Hi @terry1purcell. Thanks for your PR.
PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Codecov Report
:x: Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 56.3838%. Comparing base (83c4a0f) to head (b38d44b).
:warning: Report is 1733 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #55512 +/- ##
=================================================
- Coverage 73.3976% 56.3838% -17.0139%
=================================================
Files 1629 1780 +151
Lines 450073 639932 +189859
=================================================
+ Hits 330343 360818 +30475
- Misses 99467 254447 +154980
- Partials 20263 24667 +4404
| Flag | Coverage Δ | |
|---|---|---|
| integration | 30.7759% <0.0000%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Δ | |
|---|---|---|
| dumpling | ∅ <ø> (∅) |
|
| parser | ∅ <ø> (∅) |
|
| br | 52.9108% <ø> (+6.6860%) |
:arrow_up: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign ailinkid for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/ok-to-test
@terry1purcell: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| tidb_parser_test | b38d44b39604ca0f9e2fb67c302a6894620cf9da | link | true | /test tidb_parser_test |
| fast_test_tiprow | b38d44b39604ca0f9e2fb67c302a6894620cf9da | link | true | /test fast_test_tiprow |
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.
@terry1purcell: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| idc-jenkins-ci-tidb/mysql-test | b38d44b39604ca0f9e2fb67c302a6894620cf9da | link | true | /test mysql-test |
| idc-jenkins-ci-tidb/check_dev | b38d44b39604ca0f9e2fb67c302a6894620cf9da | link | true | /test check-dev |
| idc-jenkins-ci-tidb/unit-test | b38d44b39604ca0f9e2fb67c302a6894620cf9da | link | true | /test unit-test |
| idc-jenkins-ci-tidb/check_dev_2 | b38d44b39604ca0f9e2fb67c302a6894620cf9da | link | true | /test check-dev2 |
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.