-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: fix type infer of unaryMinus which should return ETDecimal if ETInt overflow int #11989
Conversation
…l if overflow int Signed-off-by: Lonng <heng@lonng.org>
Signed-off-by: Lonng <heng@lonng.org>
Codecov Report
@@ Coverage Diff @@
## master #11989 +/- ##
================================================
- Coverage 81.2782% 81.2248% -0.0535%
================================================
Files 444 443 -1
Lines 95130 95019 -111
================================================
- Hits 77320 77179 -141
- Misses 12322 12347 +25
- Partials 5488 5493 +5 |
/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
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 |
/run-cherry-picker |
cherry pick to release-2.1 in PR #11990 |
cherry pick to release-3.0 in PR #11991 |
Signed-off-by: Lonng heng@lonng.org
What problem does this PR solve?
Fix #11983
The typeInfer of
unaryMinus
function should returntypes.ETDecimal
if the inferred type istypes.ETInt
and the value will overflow the int bound.What is changed and how it works?
Relax restrictions of the
unaryMinus.typeInfer
which should alway handle int overflow instead of just inSELECT
statement.Check List
Tests
Related changes
tidb-ansible
repositoryRelease note
unaryMinus
which should returnETDecimal
if theETInt
overflow int bound.