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 collation for REGEXP function #17255

Merged
merged 6 commits into from
Jun 2, 2020

Conversation

wjhuang2016
Copy link
Member

What problem does this PR solve?

Issue Number: close #17094

Problem Summary:
Previously, we didn't handle collation when builds the REGEXP function.

What is changed and how it works?

If the collation is case-insensitive, we compile it by regexp.Compile("(?i)" + pat).
If not, we compile it by regexp.Compile

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

Release note

  • support collation for REGEXP function

@wjhuang2016 wjhuang2016 requested a review from a team as a code owner May 18, 2020 05:17
@ghost ghost requested review from wshwsh12 and removed request for a team May 18, 2020 05:17
@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #17255 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #17255   +/-   ##
===========================================
  Coverage   79.7429%   79.7429%           
===========================================
  Files           522        522           
  Lines        142133     142133           
===========================================
  Hits         113341     113341           
  Misses        19780      19780           
  Partials       9012       9012           

Copy link
Member

@bb7133 bb7133 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
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

@qw4990 qw4990 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. labels Jun 1, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Jun 1, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jun 1, 2020

@wjhuang2016 merge failed.

@wjhuang2016
Copy link
Member Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Jun 1, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jun 1, 2020

@wjhuang2016 merge failed.

@wjhuang2016
Copy link
Member Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Jun 2, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jun 2, 2020

@wjhuang2016 merge failed.

@wjhuang2016
Copy link
Member Author

/run-unit-test

@wjhuang2016 wjhuang2016 merged commit 2375951 into pingcap:master Jun 2, 2020
sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Jun 2, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 2, 2020

cherry pick to release-4.0 in PR #17581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REGEX function doesn't support collation
5 participants