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, executor: add iso 8601 and timezone support for temporal string literal (#20534) #20670

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Oct 27, 2020

cherry-pick #20534 to release-4.0


What problem does this PR solve?

Issue Number: close #20348 and addtionally close #20507

Problem Summary:

Added timezone support for datetime and timestamp string literal.

What is changed and how it works?

Proposal: see discussions here

What's Changed:

Added parsing, absorbing and converting logic for correct handling of ISO8601 and MySQL 8.0 timezone.

How it Works:

  • Parsing is done by enumerating all possible scenariors.
  • Absorbing is done by look ahead at the separated parts of date and time.
  • Converting is done by first interpret the time by given timezone and then convert back to system timezone.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to 4.0, need to be delivered in 4.0.8.

Check List

Tests

  • Unit test
  • Integration test

Side effects

  • Performance regression
    • Consumes more CPU

Release note

  • No release note

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

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 the status/LGT1 Indicates that a PR has LGTM 1. label Oct 27, 2020
Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@ichn-hu
Copy link
Contributor

ichn-hu commented Oct 27, 2020

/run-all-tests

@jebter
Copy link

jebter commented Oct 27, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Sorry @jebter, this branch cannot be merged without an approval of release maintainers

Copy link
Contributor

@SunRunAway SunRunAway 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 Oct 27, 2020
@jebter
Copy link

jebter commented Oct 27, 2020

/merge

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

/run-all-tests

@ti-srebot ti-srebot merged commit 5ef2d8d into pingcap:release-4.0 Oct 27, 2020
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/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants