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

*: code preparations for supporting build range for like function on new collation columns | tidb-test=pr/2253 #48972

Merged
merged 6 commits into from
Nov 30, 2023

Conversation

time-and-fate
Copy link
Member

@time-and-fate time-and-fate commented Nov 28, 2023

What problem does this PR solve?

Issue Number: ref #48181

What changed and how does it work?

  1. Some code formatting, variable renaming, and adding comments.
  2. After we finish Can't use like to build range when new collation is enabled #48181, many values in ranges for string columns will become sort key (bytes) instead of the original value (usually string) like the previous. Because bytes and string have different printing formats when displaying the execution plan, this will make many changes in the displayed execution plan in the test cases. So I changed the formats of printing bytes to make it consistent with strings. (pkg/util/ranger/types.go)
  3. For the fast path, setting the collation of a value to the collation of the column is moved from the executor builder into the optimizer. After we finish Can't use like to build range when new collation is enabled #48181, no matter what collation the column is, when it comes here, the datum might be the sort key, which must be bytes, and setting the datum to the collation of the column will be wrong. But this setting is needed, so we move it to an earlier stage. (pkg/executor/point_get.go, pkg/planner/core/point_get_plan.go)
  4. Add test cases. So we can see the diff in the final PR.

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 changed the title *: code preparations for supporting build range for like function on new collation columns *: code preparations for supporting build range for like function on new collation columns | tidb-test=pr/2253 Nov 28, 2023
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Merging #48972 (791ce64) into master (b016589) will increase coverage by 1.3097%.
Report is 2 commits behind head on master.
The diff coverage is 95.1612%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #48972        +/-   ##
================================================
+ Coverage   70.9895%   72.2993%   +1.3097%     
================================================
  Files          1368       1397        +29     
  Lines        403893     412691      +8798     
================================================
+ Hits         286722     298373     +11651     
+ Misses        97205      95497      -1708     
+ Partials      19966      18821      -1145     
Flag Coverage Δ
integration 43.6969% <95.1612%> (?)
unit 70.9874% <ø> (-0.0022%) ⬇️

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

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 48.3541% <ø> (-4.6181%) ⬇️

Copy link

ti-chi-bot bot commented Nov 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tangenta, 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

Copy link

ti-chi-bot bot commented Nov 30, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-29 10:41:21.436087348 +0000 UTC m=+1005710.101313545: ☑️ agreed by winoros.
  • 2023-11-30 09:39:05.564220987 +0000 UTC m=+1088374.229447181: ☑️ agreed by tangenta.

@time-and-fate
Copy link
Member Author

/test mysql-test

Copy link

tiprow bot commented Nov 30, 2023

@time-and-fate: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test mysql-test

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.

@time-and-fate
Copy link
Member Author

/test mysql-test

Copy link

tiprow bot commented Nov 30, 2023

@time-and-fate: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test mysql-test

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.

@ti-chi-bot ti-chi-bot bot merged commit 598ccad into pingcap:master Nov 30, 2023
16 checks passed
time-and-fate added a commit to time-and-fate/tidb that referenced this pull request Dec 5, 2023
time-and-fate added a commit to time-and-fate/tidb that referenced this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants