Skip to content
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 precision when casting float to string #9137

Merged
merged 4 commits into from
Jan 29, 2019

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Fix #9123

What is changed and how it works?

Cast float32(208.867) to float64 will get float64(208.86700439), and
convert the later to string will get a result with wrong precision

Check List

Tests

  • Unit test

PTAL @XuHuaiyu @eurekaka

Cast float32(208.867) to float64 will get float64(208.86700439), and
convert the later to string will get a result with wrong precision
@codecov-io
Copy link

codecov-io commented Jan 21, 2019

Codecov Report

Merging #9137 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #9137      +/-   ##
=========================================
- Coverage   67.21%   67.2%   -0.02%     
=========================================
  Files         371     371              
  Lines       76982   76985       +3     
=========================================
- Hits        51743   51737       -6     
- Misses      20618   20624       +6     
- Partials     4621    4624       +3
Impacted Files Coverage Δ
expression/builtin_cast.go 80.01% <100%> (+0.05%) ⬆️
ddl/delete_range.go 75.13% <0%> (-4.24%) ⬇️
store/tikv/scan.go 73.94% <0%> (-3.37%) ⬇️
expression/schema.go 94.11% <0%> (-0.85%) ⬇️
executor/join.go 78.38% <0%> (+0.52%) ⬆️
executor/index_lookup_join.go 77.91% <0%> (+0.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 19a0039...03dbbf6. Read the comment docs.

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eurekaka eurekaka added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 22, 2019
@eurekaka
Copy link
Contributor

@tiancaiamao does this fix need to be cherry-picked to release branches?

@tiancaiamao
Copy link
Contributor Author

Maybe I should do that @eurekaka

@tiancaiamao tiancaiamao self-assigned this Jan 23, 2019
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason
Copy link
Member

/run-all-tests

@zimulala zimulala added status/LGT2 Indicates that a PR has LGTM 2. status/all tests passed and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants