-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
expr: fix panic when using radians and degree #17853
Conversation
Signed-off-by: gengliqi <[email protected]>
Signed-off-by: gengliqi <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: breezewish, overvenus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
@gengliqi: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
close #17852 expr: fix panic when using radians and degree Signed-off-by: gengliqi <[email protected]> Co-authored-by: gengliqi <[email protected]>
close #17852 expr: fix panic when using radians and degree Signed-off-by: gengliqi <[email protected]> Co-authored-by: gengliqi <[email protected]>
close #17852 expr: fix panic when using radians and degree Signed-off-by: gengliqi <[email protected]> Co-authored-by: gengliqi <[email protected]>
close #17852 expr: fix panic when using radians and degree Signed-off-by: gengliqi <[email protected]> Co-authored-by: gengliqi <[email protected]>
close tikv#17852 expr: fix panic when using radians and degree Signed-off-by: gengliqi <[email protected]>
close #17852 expr: fix panic when using radians and degree Signed-off-by: gengliqi <[email protected]> Co-authored-by: gengliqi <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
close tikv#17852 expr: fix panic when using radians and degree Signed-off-by: gengliqi <[email protected]> Signed-off-by: 3AceShowHand <[email protected]>
What is changed and how it works?
Issue Number: Close #17852
What's Changed:
radians
changes fromarg * PI / 180
toarg * (PI / 180)
to avoid infinite float issues. FYI: https://github.com/mysql/mysql-server/blob/ee079e5ca930ce5ed0643326abadeed8cd41fffc/sql/item_func.h#L1556 MySQL also calculatesPI / 180
firstly.degrees
can be infinite so adding a check for it.Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
Release note