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

time: fix parse datetime won't truncate the reluctant string #22232

Merged
merged 9 commits into from
Jan 7, 2021

Conversation

AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Jan 6, 2021

Signed-off-by: AilinKid 314806019@qq.com

What problem does this PR solve?

Issue Number: close #22231

What is changed and how it works?

What's Changed:
parse the entire string into seps, then, when it bigger than 6, truncate the valid ones into a time and append a warning.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

Release note

  • time: parse datatime won't truncate the reluctant string.

Signed-off-by: AilinKid <314806019@qq.com>
@AilinKid AilinKid requested a review from a team as a code owner January 6, 2021 10:46
@AilinKid AilinKid requested review from wshwsh12 and removed request for a team January 6, 2021 10:46
Copy link
Contributor

@tangenta tangenta 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 Jan 6, 2021
@AilinKid AilinKid changed the title time: parse datatime won't truncate the reluctant string time: fix parse datatime won't truncate the reluctant string Jan 7, 2021
@AilinKid AilinKid changed the title time: fix parse datatime won't truncate the reluctant string time: fix parse datetime won't truncate the reluctant string Jan 7, 2021
Copy link
Contributor

@xhebox xhebox 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
Copy link
Contributor

@xhebox, Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments. See the corresponding SIG page for more information. Related SIG: execution(slack).

@AilinKid
Copy link
Contributor Author

AilinKid commented Jan 7, 2021

/run-all-tests

@AilinKid
Copy link
Contributor Author

AilinKid commented Jan 7, 2021

/run-all-tests tidb-test=pr/1150

@AilinKid
Copy link
Contributor Author

AilinKid commented Jan 7, 2021

/run-all-tests tidb-test=pr/1150

@AilinKid
Copy link
Contributor Author

AilinKid commented Jan 7, 2021

PTAL @wshwsh12

Copy link
Contributor

@wshwsh12 wshwsh12 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 Jan 7, 2021
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jan 7, 2021
@AilinKid
Copy link
Contributor Author

AilinKid commented Jan 7, 2021

/run-all-tests tidb-test=pr/1150

@ichn-hu ichn-hu mentioned this pull request Jan 7, 2021
@AilinKid
Copy link
Contributor Author

AilinKid commented Jan 7, 2021

/run-unit-test tidb-test=pr/1150

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

cherry pick to release-3.1 failed

ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Jan 7, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
AilinKid added a commit to ti-srebot/tidb that referenced this pull request Jan 28, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression sig/execution SIG execution status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

time: parse datatime won't truncate the reluctant string
5 participants