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

Planner: Estimate to recognize modifyCount when all TopN collected #55077

Merged
merged 10 commits into from
Aug 1, 2024

Conversation

terry1purcell
Copy link
Contributor

@terry1purcell terry1purcell commented Jul 30, 2024

What problem does this PR solve?

Issue Number: close #47400

Problem Summary:

What changed and how does it work?

Use modifyCount to determine if it is safe to assume that a zero row estimate is valid if the TopN covers all NDV values.

Check List

Tests

  • 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

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 30, 2024
Copy link

ti-chi-bot bot commented Jul 30, 2024

Hi @terry1purcell. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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/test-infra repository.

Copy link

tiprow bot commented Jul 30, 2024

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.

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Jul 31, 2024
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.

Project coverage is 74.8276%. Comparing base (fdcb2e4) to head (620d11a).
Report is 1240 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55077        +/-   ##
================================================
+ Coverage   74.7302%   74.8276%   +0.0974%     
================================================
  Files          1563       1567         +4     
  Lines        364352     440034     +75682     
================================================
+ Hits         272281     329267     +56986     
- Misses        72379      90640     +18261     
- Partials      19692      20127       +435     
Flag Coverage Δ
integration 49.5807% <77.7777%> (?)
unit 71.8209% <88.8888%> (-1.8048%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.8433% <ø> (-2.3461%) ⬇️
parser ∅ <ø> (∅)
br 52.5288% <ø> (+4.8221%) ⬆️

@Rustin170506 Rustin170506 self-requested a review July 31, 2024 10:57
@terry1purcell
Copy link
Contributor Author

/cc @hawkingrei

@ti-chi-bot ti-chi-bot bot requested a review from hawkingrei July 31, 2024 17:43
Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

Do we need to include the case from #47400 as a unit case to cover this logic? Thanks!

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 1, 2024
Copy link

ti-chi-bot bot commented Aug 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hi-rustin, winoros

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 1, 2024
Copy link

ti-chi-bot bot commented Aug 1, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-01 12:52:08.520315899 +0000 UTC m=+7525.739077504: ☑️ agreed by hi-rustin.
  • 2024-08-01 15:03:30.024206878 +0000 UTC m=+15407.242968487: ☑️ agreed by winoros.

@ti-chi-bot ti-chi-bot bot merged commit 2945819 into pingcap:master Aug 1, 2024
23 checks passed
@terry1purcell terry1purcell deleted the zeroest branch August 1, 2024 22:16
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Nov 7, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Nov 7, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #57216.

@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label Dec 11, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #58149.

@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Dec 11, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #58172.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 11, 2024
@ti-chi-bot ti-chi-bot bot removed the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Dec 13, 2024
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. label Jan 21, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #59073.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 21, 2025
@ti-chi-bot ti-chi-bot bot removed the needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

planner: zero estimation result if all values are in TopN
5 participants