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: Comparing binary string with int caused issue in partition pruning #52041

Merged
merged 4 commits into from
Mar 25, 2024

Conversation

mjonss
Copy link
Contributor

@mjonss mjonss commented Mar 22, 2024

What problem does this PR solve?

Issue Number: close #52023

Problem Summary:
Comparing binary string with number should not be allowed, and caused issue in partition pruning.

What changed and how does it work?

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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 22, 2024
Copy link

tiprow bot commented Mar 22, 2024

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

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Merging #52041 (c915be5) into master (12af2e4) will decrease coverage by 24.1924%.
The diff coverage is 0.0000%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #52041         +/-   ##
=================================================
- Coverage   72.4858%   48.2934%   -24.1924%     
=================================================
  Files          1481       1592        +111     
  Lines        365386     604554     +239168     
=================================================
+ Hits         264853     291960      +27107     
- Misses        81053     290468     +209415     
- Partials      19480      22126       +2646     
Flag Coverage Δ
integration 18.1897% <0.0000%> (?)

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

Components Coverage Δ
dumpling 56.2971% <ø> (ø)
parser ∅ <ø> (∅)
br 43.6654% <ø> (-2.7360%) ⬇️

@bb7133
Copy link
Member

bb7133 commented Mar 22, 2024

PTAL @qw4990 @time-and-fate

Copy link
Member

@time-and-fate time-and-fate left a comment

Choose a reason for hiding this comment

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

LGTM.
Hope this won't cause any performance regression in the release benchmark.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 24, 2024
@mjonss
Copy link
Contributor Author

mjonss commented Mar 25, 2024

@time-and-fate

Hope this won't cause any performance regression in the release benchmark.
It will only affect performance of point get when (wrongly) comparing binary(N < 8) column to int, which is now not executed as table scan instead, due to CAST is needed.

@bb7133 bb7133 closed this Mar 25, 2024
@bb7133 bb7133 reopened this Mar 25, 2024
Copy link

ti-chi-bot bot commented Mar 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, qw4990, time-and-fate

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:
  • OWNERS [Defined2014,qw4990,time-and-fate]

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 Mar 25, 2024
Copy link

ti-chi-bot bot commented Mar 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-24 14:25:15.141679913 +0000 UTC m=+1818742.163926301: ☑️ agreed by time-and-fate.
  • 2024-03-25 02:48:12.296794223 +0000 UTC m=+1863319.319040606: ☑️ agreed by qw4990.

@ti-chi-bot ti-chi-bot bot merged commit b8b3b92 into pingcap:master Mar 25, 2024
23 checks passed
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 25, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot pushed a commit that referenced this pull request Mar 25, 2024
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-8.0 release-note-none Denotes a PR that doesn't merit a release note. 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.

point_get from binary column partition table get panic
6 participants