-
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: unify casting real to string in tidb (tikv#16975) | tidb-test=pr/2325 (#53129) #53207
expression: unify casting real to string in tidb (tikv#16975) | tidb-test=pr/2325 (#53129) #53207
Conversation
/test mysql-test |
@solotzg: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
In response to this:
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. |
@solotzg: No presubmit jobs available for pingcap/tidb@release-8.1 In response to this:
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-sigs/prow repository. |
/retest |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-8.1 #53207 +/- ##
================================================
Coverage ? 71.1959%
================================================
Files ? 1465
Lines ? 421260
Branches ? 0
================================================
Hits ? 299920
Misses ? 100901
Partials ? 20439
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wshwsh12, XuHuaiyu 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 |
/retest |
This is an automated cherry-pick of #53129
What problem does this PR solve?
Issue Number: close #51109
Problem Summary:
strconv
.strconv
useRyu algorithm
to calculate significant digits.f32::to_string
&f64::to_string
to implement casting real to str. It can NOT guarantee precision if the number of significant digits exceeds the upper limit (f32: 6, f64: 15).What changed and how does it work?
Unify the behavior of converting real types to strings in tidb and tikv(tikv/tikv#16975).
abs(num) >= 1e15 or abs(num) < 1e-15
then use decimal exponent formatCheck List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.