expression: fix the issue that extracting day_microsecond/day_second/day_minute/day_hour from Time type emits wrong result#36297
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/063ed152521951320c542a4855266404c83e37bb |
|
/run-check_dev_2 |
1 similar comment
|
/run-check_dev_2 |
|
@solotzg: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: ccded3a |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-5.0 in PR #36333 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-5.1 in PR #36335 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-5.2 in PR #36336 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-5.3 in PR #36337 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-5.4 in PR #36338 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-6.0 in PR #36339 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-6.1 in PR #36340 |
TiDB MergeCI notify🔴 Bad News! [1] CI still failing after this pr merged.
|
What problem does this PR solve?
Issue Number: close #34998
Problem Summary:
There was once an issue #9716 about
extract(day_microsecond)not recognizing the heading day portion, and it was later fixed by #21601. But that PR introduced another problem aboutextract(day_microsecond)on regular time data. What happens under the hood is:day_microsecondguides the type infer to interpret the time data as datetime through implicit cast;What is changed and how it works?
For regular datetime/timestamp/time types, let
extract(day_microsecond/second/minute/hour)interpret it as time.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.