-
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: throw "too big precision" error for CAST(AS TIME) #8907
Conversation
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
/run-all-tests tidb-test=pr/711 |
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #8907 +/- ##
==========================================
+ Coverage 67.55% 67.58% +0.03%
==========================================
Files 363 363
Lines 75301 75309 +8
==========================================
+ Hits 50868 50901 +33
+ Misses 19940 19917 -23
+ Partials 4493 4491 -2
Continue to review full report at Codecov.
|
/run-all-tests |
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?
For the following SQL:
we should return a error as MySQL does:
Another tiny bugfix is, for cast decimal as time, when the input decimal is NULL, we should return NULL.
What is changed and how it works?
Check the target precision first, if the check result is positive, we then continue to recursively evaluate child expression.
Check List
Tests
Code changes
Related changes
This change is