-
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, types: fix Mod(%), Multiple(*), Minus(-) operators meets inconsistent 0 results. #11251
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11251 +/- ##
===========================================
Coverage 81.4578% 81.4578%
===========================================
Files 423 423
Lines 90885 90885
===========================================
Hits 74033 74033
Misses 11544 11544
Partials 5308 5308 |
Hi, after seeing your pull request, it may have other problems with Could you take a review and fix them too? |
types/mydecimal.go
Outdated
*to = zeroMyDecimal | ||
to.resultFrac = resultFrac |
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.
Please add a comment here to explain these three lines.
And it's better to add a unit test in mydecimal_test.go
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
OK |
Hi, @wjhuang2016 |
yeah |
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 👍
Hi, @wjhuang2016 |
/run-all-tests tidb-test=pr/862 |
It covers |
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 #11211
What is changed and how it works?
Add a method
zeroMyDecimalWithFrac()
to get the zero of MyDecimal with the specified result fraction digitsCheck List
Tests
Code changes
Side effects
Related changes