Skip to content

Conversation

terry1purcell
Copy link
Contributor

@terry1purcell terry1purcell commented Feb 4, 2025

What problem does this PR solve?

Issue Number: close #59133

Problem Summary:

What changed and how does it work?

Due to precision errors in floating point, a small tolerance is needed to ensure that an unnecessary adjustments are not made for cardinality estimation. An arbitrary value of 0.00001 is used as the tolerance.

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 release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 4, 2025
Copy link

tiprow bot commented Feb 4, 2025

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.

@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 4, 2025
@terry1purcell terry1purcell changed the title planner: add tolerance for index row cost floating point comparison planner: add tolerance for row count floating point comparison Feb 4, 2025
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.5983%. Comparing base (43f2fb9) to head (1fed4d2).
Report is 9 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59241        +/-   ##
================================================
+ Coverage   73.0608%   73.5983%   +0.5375%     
================================================
  Files          1689       1689                
  Lines        467012     467562       +550     
================================================
+ Hits         341203     344118      +2915     
+ Misses       104839     102532      -2307     
+ Partials      20970      20912        -58     
Flag Coverage Δ
integration 42.8271% <100.0000%> (?)
unit 72.3884% <100.0000%> (+0.1530%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.5004% <ø> (+0.0286%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 4, 2025
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 5, 2025
Copy link

ti-chi-bot bot commented Feb 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, 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 Feb 6, 2025
Copy link

ti-chi-bot bot commented Feb 6, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-05 04:03:35.273956429 +0000 UTC m=+244486.806368421: ☑️ agreed by winoros.
  • 2025-02-06 05:58:10.376215828 +0000 UTC m=+337761.908627826: ☑️ agreed by hawkingrei.

@ti-chi-bot ti-chi-bot bot merged commit 430fa8f into pingcap:master Feb 6, 2025
24 checks passed
@terry1purcell
Copy link
Contributor Author

/cherry-pick release-8.5

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 6, 2025
@ti-chi-bot
Copy link
Member

@terry1purcell: new pull request created to branch release-8.5: #59278.
But this PR has conflicts, please resolve them!

In response to this:

/cherry-pick release-8.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.

@terry1purcell
Copy link
Contributor Author

/cherry-pick release-8.1

@terry1purcell terry1purcell deleted the tolerance branch February 7, 2025 21:06
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 7, 2025
@ti-chi-bot
Copy link
Member

@terry1purcell: new pull request created to branch release-8.1: #59334.
But this PR has conflicts, please resolve them!

In response to this:

/cherry-pick 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.

Index scan(row count should be less than 8) costs more than table full scan
4 participants