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

util/collate, util/ranger: move and update IsPadSpaceCollation() #56970

Merged

Conversation

time-and-fate
Copy link
Member

What problem does this PR solve?

Issue Number: N/A

Problem Summary:

Since IsPadSpaceCollation was introduced into the planner originally, two new PAD SPACE collations have been supported by tidb.
Probably it's a proper time now to move this method to util/collate to be maintained by the SQL infra team.

Note that although the checking is wrong in recent versions, there are no correctness issues. There is just some unnecessary accessing and filtering.

What changed and how does it work?

  • Update IsPadSpaceCollation() for the newly introduced utf8mb4_0900_* collations.
  • Move IsPadSpaceCollation() from util/ranger to util/collate.

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

@time-and-fate time-and-fate added the skip-issue-check Indicates that a PR no need to check linked issue. label Oct 29, 2024
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 29, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 29, 2024
Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Oct 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: winoros, YangKeao

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 Oct 29, 2024
Copy link

ti-chi-bot bot commented Oct 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-29 13:47:36.127407198 +0000 UTC m=+357568.966562745: ☑️ agreed by winoros.
  • 2024-10-29 13:47:53.649774866 +0000 UTC m=+357586.488930396: ☑️ agreed by YangKeao.

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.3328%. Comparing base (38e63a3) to head (5c329ce).
Report is 2 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56970         +/-   ##
=================================================
- Coverage   73.3059%   56.3328%   -16.9731%     
=================================================
  Files          1638       1764        +126     
  Lines        453782     632684     +178902     
=================================================
+ Hits         332649     356409      +23760     
- Misses       100773     252252     +151479     
- Partials      20360      24023       +3663     
Flag Coverage Δ
integration 37.1711% <100.0000%> (?)
unit 72.5671% <80.0000%> (+0.0498%) ⬆️

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 52.6437% <ø> (+6.6448%) ⬆️

@ti-chi-bot ti-chi-bot bot merged commit 1c386db into pingcap:master Oct 29, 2024
23 checks passed
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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. skip-issue-check Indicates that a PR no need to check linked issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants