-
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: change the round rule for approximate value to round to nearest even
(#21324)
#21628
expression: change the round rule for approximate value to round to nearest even
(#21324)
#21628
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
/run-all-tests |
@wshwsh12 you're already a collaborator in bot's repo. |
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
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
/merge |
Sorry @qw4990, this branch cannot be merged without an approval of release maintainers. |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
/run-all-tests |
cherry-pick #21324 to release-4.0
What problem does this PR solve?
Issue Number: close #1108
Problem Summary:
The Round rule for approximate-value numbers is “round half away from zero”, which is different from the “round to nearest even” rule used by MySQL.
What is changed and how it works?
What's Changed:
The round rule for approximate-value numbers is changed to “round to nearest even” rule.
How it Works:
select cast(25E-1 as signed)
+-----------------------+
| cast(25E-1 as signed) |
+-----------------------+
| 2 |
+-----------------------+
Related changes
Tests
Side effects
Release note