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

feat(common): impl division of Int256 and double precision #9169

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

shanicky
Copy link
Contributor

@shanicky shanicky commented Apr 13, 2023

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

What's changed and what's your intention?

This pull request introduces new arithmetic operations for performing division between int256 and floating point numbers, resulting in a float64 scalar. Changes include the addition of new operations to "general_div" in arithmetic_op.rs and "int256" in types.rs, as well as new tests to verify arithmetic operations with Int256 values. Finally, new conversion routines were added in num256.rs to enable conversions between Int256 and float64 Scalar types.

Checklist For Contributors

  • 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 Sqlsmith: Sql feature generation #7934).
  • 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 to the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

  • My PR DOES NOT contain user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Merging #9169 (6186d83) into main (9bf890a) will decrease coverage by 0.01%.
The diff coverage is 97.05%.

@@            Coverage Diff             @@
##             main    #9169      +/-   ##
==========================================
- Coverage   70.86%   70.85%   -0.01%     
==========================================
  Files        1200     1200              
  Lines      199974   200007      +33     
==========================================
+ Hits       141711   141723      +12     
- Misses      58263    58284      +21     
Flag Coverage Δ
rust 70.85% <97.05%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/expr/macro/src/types.rs 94.37% <50.00%> (-0.57%) ⬇️
src/common/src/types/num256.rs 64.85% <100.00%> (+1.15%) ⬆️
src/expr/src/vector_op/arithmetic_op.rs 72.14% <100.00%> (+1.34%) ⬆️

... and 9 files with indirect coverage changes

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

@shanicky shanicky added this pull request to the merge queue Apr 13, 2023
Merged via the queue into main with commit 22c1841 Apr 13, 2023
5 checks passed
@shanicky shanicky deleted the peng/num256-f64 branch April 13, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants