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: fix unique key get wrong row count when to query the NULL value | tidb-test=pr/2390 #56117

Merged
merged 4 commits into from
Sep 19, 2024

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Sep 18, 2024

What problem does this PR solve?

Issue Number: close #56116

Problem Summary:

What changed and how does it work?

There will be issues with the row count under index/unique index. Previously, we would uniformly count the row count for this PointGet as 1, but if it is null, it will no longer be 1 and must be calculated according to the null count.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

From internal test cases

  • 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

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@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. do-not-merge/needs-triage-completed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/planner SIG: Planner and removed do-not-merge/needs-tests-checked labels Sep 18, 2024
@hawkingrei
Copy link
Member Author

/check-issue-triage-complete

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@hawkingrei
Copy link
Member Author

/check-issue-triage-complete

@hawkingrei hawkingrei changed the title planner: fix unique key get wrong row count when to query the NULL value planner: fix unique key get wrong row count when to query the NULL value | tidb-test=pr/2390 Sep 18, 2024
@hawkingrei
Copy link
Member Author

/retest

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 56.1193%. Comparing base (3ae6470) to head (39b3939).
Report is 20 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56117         +/-   ##
=================================================
- Coverage   72.8947%   56.1193%   -16.7755%     
=================================================
  Files          1611       1737        +126     
  Lines        447371     626622     +179251     
=================================================
+ Hits         326110     351656      +25546     
- Misses       101188     251234     +150046     
- Partials      20073      23732       +3659     
Flag Coverage Δ
integration 37.2033% <75.0000%> (?)
unit 72.1074% <75.0000%> (+0.1038%) ⬆️

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

Components Coverage Δ
dumpling 52.9567% <ø> (ø)
parser ∅ <ø> (∅)
br 52.9089% <ø> (+7.1102%) ⬆️

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 18, 2024
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Copy link

ti-chi-bot bot commented Sep 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qw4990, 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 Sep 19, 2024
Copy link

ti-chi-bot bot commented Sep 19, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-18 12:40:49.32635224 +0000 UTC m=+1051319.066776179: ☑️ agreed by winoros.
  • 2024-09-19 03:27:21.775939883 +0000 UTC m=+1104511.516363823: ☑️ agreed by qw4990.

@ti-chi-bot ti-chi-bot bot merged commit 70a26f8 into pingcap:master Sep 19, 2024
23 checks passed
@hawkingrei
Copy link
Member Author

/cherrypick release-8.1

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-8.1: #56154.

In response to this:

/cherrypick release-8.1

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 ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 19, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
hawkingrei added a commit to ti-chi-bot/tidb that referenced this pull request Sep 20, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@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 Sep 20, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 20, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

@hawkingrei
Copy link
Member Author

/cherrypick release-7.5

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.5 from head ti-chi-bot:cherry-pick-56117-to-release-7.5: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-56117-to-release-7.5."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request","status":"422"}

In response to this:

/cherrypick release-7.5

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 ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 20, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
winoros pushed a commit to winoros/tidb that referenced this pull request Sep 23, 2024
@hawkingrei
Copy link
Member Author

/cherrypick release-6.5

@hawkingrei hawkingrei deleted the wrong_row_count branch September 25, 2024 02:20
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 25, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-6.5: #56277.

In response to this:

/cherrypick release-6.5

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. and removed needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. labels Sep 26, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 26, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

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.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unique key get wrong row count when to query the Null value
4 participants