-
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: QUARTER/DATE_FORMAT compatibility with mysql for 0/0.0 values #12488
Conversation
TiDB now works for Query #1
Query #2
|
/run-unit-test |
Codecov Report
@@ Coverage Diff @@
## master #12488 +/- ##
================================================
+ Coverage 80.1169% 80.6663% +0.5494%
================================================
Files 469 469
Lines 112045 114500 +2455
================================================
+ Hits 89767 92363 +2596
+ Misses 15320 15207 -113
+ Partials 6958 6930 -28 |
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.
Hi, thank you for the pr. I've left some comments, PTAL.
…mysql-compat-quarter
It looks like Schema (MySQL v5.7)
TiDB:
So i just fixed warnings for 0/0.0 values and added more tests. |
PTAL |
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.
Hi, sorry for the late reply, we've taken a long vacation and back to work now.
I've left some comments again, PTAL. Thanks.
|
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
Your auto merge job has been accepted, waiting for 13014, 12827, 13181, 13088 |
/run-all-tests |
@ekalinin merge failed. |
/run-unit-test |
cherry pick to release-2.1 failed |
cherry pick to release-3.0 failed |
cherry pick to release-3.1 failed |
It seems that, not for sure, we failed to cherry-pick this commit to release-2.1 release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @SunRunAway PTAL. |
What problem does this PR solve?
Partial fix for the #11203 (+ #11223 as a global issue, + #9728)
What is changed and how it works?
Added corner cases into
builtinCastIntAsTimeSig/builtinCastDecimalAsTimeSig
.If the original value is 0 or 0.0 then it converted as empty Time struct (not a NULL value).
builtinQuarterSig.evalInt
checks if we have zero date and it's not not a NULL after casting then we return 0, not NULL.Check List
Tests
Code changes
Side effects
Related changes
Release note