-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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: check timezone when encoding timestamp datum #10303
Conversation
/run-all-tests |
/run-mybatis-test |
Codecov Report
@@ Coverage Diff @@
## master #10303 +/- ##
================================================
- Coverage 77.6781% 77.6714% -0.0068%
================================================
Files 411 411
Lines 85450 85451 +1
================================================
- Hits 66376 66371 -5
- Misses 14111 14118 +7
+ Partials 4963 4962 -1 |
/run-integration-common-test tidb-test=pr/794 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/rebuild |
@eurekaka there's a unit test failed in check_dev_2 though it passed in circle CI. |
/run-all-tests tidb-test=pr/794 |
1 similar comment
/run-all-tests tidb-test=pr/794 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
What problem does this PR solve?
Fix #10302
What is changed and how it works?
Convert timestamp datum to UTC timezone in
encodeDatum
, to make it compatible withencode
andPBToExpr
.Note that in code of coprocessor, there exists timezone conversion logic as well, see https://github.com/tikv/tikv/blob/2e1e20f7ced72a3333c2504fa4bfb53b44fe4b8a/src/coprocessor/dag/expr/mod.rs#L254 for details, so this change is compatible with TiKV.
Check List
Tests
Code changes
N/A
Side effects
N/A
Related changes