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

expression: support handle two collation cannot substituted to each other #19036

Merged
merged 5 commits into from
Aug 18, 2020

Conversation

xiongjiwei
Copy link
Contributor

@xiongjiwei xiongjiwei commented Aug 6, 2020

What problem does this PR solve?

current collation strictness cannot handle situation if two collation cannot substituted to each other
e.g. a != b in collation A, a=b in collation B and c=d in collation A, c!=d in collation B

What is changed and how it works?

group collation by strictness, two collation can be substituted each other if they are in same group.
store strictnessship in a map with group id, collation group id in value is stricter than collation group id in key

Release note

  • refine CollationStrictness to support incompatible strictnessship

@ti-srebot ti-srebot added the contribution This PR is from a community contributor. label Aug 6, 2020
@xiongjiwei xiongjiwei changed the title expression: refine CollationStrictness expression: support handle two collation cannot substituted to each other Aug 6, 2020
@xiongjiwei xiongjiwei marked this pull request as ready for review August 6, 2020 09:48
@xiongjiwei xiongjiwei requested a review from a team as a code owner August 6, 2020 09:48
@xiongjiwei xiongjiwei requested review from XuHuaiyu and removed request for a team August 6, 2020 09:48
expression/util.go Outdated Show resolved Hide resolved
expression/util.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 7, 2020

Codecov Report

Merging #19036 into master will increase coverage by 0.0198%.
The diff coverage is 81.8181%.

@@               Coverage Diff                @@
##             master     #19036        +/-   ##
================================================
+ Coverage   79.3672%   79.3870%   +0.0197%     
================================================
  Files           546        546                
  Lines        148996     148033       -963     
================================================
- Hits         118254     117519       -735     
+ Misses        21249      21018       -231     
- Partials       9493       9496         +3     

Copy link
Member

@wjhuang2016 wjhuang2016 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 12, 2020
@qw4990
Copy link
Contributor

qw4990 commented Aug 18, 2020

@xiongjiwei Sorry for my late reply. Could you please add some tests for this?

@xiongjiwei
Copy link
Contributor Author

xiongjiwei commented Aug 18, 2020

@xiongjiwei Sorry for my late reply. Could you please add some tests for this?

@qw4990 It's ok. no new tests for this PR, this PR does not change logic, it is same as original logic, and this PR will be used in future. you can see the conversation with djshow832 to find why I file this PR.

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Aug 18, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Aug 18, 2020
@qw4990
Copy link
Contributor

qw4990 commented Aug 18, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 18, 2020
@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 18970
  • 19237
  • 19235

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@xiongjiwei merge failed.

@wjhuang2016
Copy link
Member

/merge

@ti-srebot
Copy link
Contributor

@wjhuang2016 Oops! auto merge is restricted to Committers of the SIG.See the corresponding SIG page for more information. Related SIGs: execution(slack).

@wjhuang2016 wjhuang2016 merged commit 8bbeceb into pingcap:master Aug 18, 2020
@xiongjiwei xiongjiwei deleted the collation-mix branch August 18, 2020 07:13
@wjhuang2016 wjhuang2016 added the sig/sql-infra SIG: SQL Infra label Aug 28, 2020
@xiongjiwei
Copy link
Contributor Author

/label needs-cherry-pick-4.0

@xiongjiwei
Copy link
Contributor Author

/run-cherry-pick

ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Jan 27, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #22582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression contribution This PR is from a community contributor. sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants