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

fix(expr): incorrect decimal rounding due to rust_decimal bug #7819

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

jon-chuang
Copy link
Contributor

@jon-chuang jon-chuang commented Feb 9, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Rust decimal bug allows rounding past 28 significant digits which is its maximum.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features).
  • I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

#7815 (comment)

@github-actions github-actions bot added the type/fix Bug fix label Feb 9, 2023
@jon-chuang jon-chuang requested a review from kwannoel February 9, 2023 14:45
@jon-chuang
Copy link
Contributor Author

fixed here: paupino/rust-decimal#575, but our hotfix is just as good.

@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Merging #7819 (ee8a7e8) into main (d6f9e2e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #7819      +/-   ##
==========================================
- Coverage   71.73%   71.72%   -0.01%     
==========================================
  Files        1106     1106              
  Lines      176247   176249       +2     
==========================================
- Hits       126429   126414      -15     
- Misses      49818    49835      +17     
Flag Coverage Δ
rust 71.72% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/expr/src/vector_op/round.rs 100.00% <100.00%> (ø)
src/batch/src/executor/group_top_n.rs 68.23% <0.00%> (-6.48%) ⬇️
src/meta/src/hummock/mock_hummock_meta_client.rs 63.95% <0.00%> (-0.51%) ⬇️
src/common/src/field_generator/mod.rs 74.50% <0.00%> (-0.50%) ⬇️
src/object_store/src/object/mem.rs 86.87% <0.00%> (-0.39%) ⬇️
src/object_store/src/object/mod.rs 51.30% <0.00%> (-0.22%) ⬇️
src/storage/src/hummock/compactor/mod.rs 80.85% <0.00%> (-0.20%) ⬇️
src/storage/src/hummock/sstable_store.rs 64.73% <0.00%> (-0.16%) ⬇️
src/common/src/cache.rs 97.15% <0.00%> (-0.11%) ⬇️
src/meta/src/hummock/manager/mod.rs 78.14% <0.00%> (-0.06%) ⬇️
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants