Skip to content

executor: add new format specifier(%# %@ %.) for str_to_date expression#22790

Merged
ti-srebot merged 3 commits intopingcap:masterfrom
guo-shaoge:issue-22530
Feb 19, 2021
Merged

executor: add new format specifier(%# %@ %.) for str_to_date expression#22790
ti-srebot merged 3 commits intopingcap:masterfrom
guo-shaoge:issue-22530

Conversation

@guo-shaoge
Copy link
Collaborator

@guo-shaoge guo-shaoge commented Feb 18, 2021

close #22530

What's Changed: add three function to parse

  1. %#: skip numbers
  2. %.: skip punct
  3. %@: skip alpha

How it Works: If got %# in format specifier, iterate input string and skip all number. Same for the other two.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

  • Performance regression: No perfmance regression
  • Breaking backward compatibility: No compatibility issue

Release note

  • add three format specifier for str_to_date expression

@guo-shaoge guo-shaoge requested a review from a team as a code owner February 18, 2021 09:24
@guo-shaoge guo-shaoge requested review from lzmhhh123 and removed request for a team February 18, 2021 09:24
@sre-bot
Copy link
Contributor

sre-bot commented Feb 18, 2021

@guo-shaoge guo-shaoge changed the title executor: add new format specifier(%# %@ %.) for str_to_date expression(#22530) executor: add new format specifier(%# %@ %.) for str_to_date expression Feb 18, 2021
@guo-shaoge
Copy link
Collaborator Author

/run-all-tests

@guo-shaoge
Copy link
Collaborator Author

@lzmhhh123

@XuHuaiyu XuHuaiyu added the type/bugfix This PR fixes a bug. label Feb 19, 2021
Copy link
Contributor

@XuHuaiyu XuHuaiyu 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 Feb 19, 2021
Copy link
Contributor

@lzmhhh123 lzmhhh123 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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 19, 2021
@lzmhhh123
Copy link
Contributor

/merge

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

/run-all-tests

@ti-srebot ti-srebot merged commit a3a4a6c into pingcap:master Feb 19, 2021
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Feb 19, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #22812

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

cherry pick to release-5.0-rc in PR #22813

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.

Date function is not compatible with Mysql

5 participants