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

More numeric binary operations with Decimal #530

Merged
merged 22 commits into from May 1, 2022
Merged

More numeric binary operations with Decimal #530

merged 22 commits into from May 1, 2022

Conversation

ghost
Copy link

@ghost ghost commented Apr 20, 2022

resolves issue #427 by adding basic decimal math

@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2022

Codecov Report

Merging #530 (e89cc07) into main (054c18e) will decrease coverage by 0.03%.
The diff coverage is 91.34%.

@@            Coverage Diff             @@
##             main     #530      +/-   ##
==========================================
- Coverage   93.14%   93.11%   -0.04%     
==========================================
  Files         177      178       +1     
  Lines       11363    11644     +281     
==========================================
+ Hits        10584    10842     +258     
- Misses        779      802      +23     
Impacted Files Coverage Δ
core/src/result.rs 81.48% <ø> (ø)
core/src/data/value/binary_op/i64.rs 97.40% <84.00%> (-2.60%) ⬇️
core/src/data/value/binary_op/i8.rs 90.64% <84.61%> (-1.09%) ⬇️
core/src/data/value/binary_op/f64.rs 97.66% <89.74%> (-2.34%) ⬇️
core/src/data/value/binary_op/decimal.rs 92.81% <92.81%> (ø)
core/src/data/value/mod.rs 95.80% <100.00%> (+0.38%) ⬆️
test-suite/src/data_type/decimal.rs 100.00% <100.00%> (ø)

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 054c18e...e89cc07. Read the comment docs.

@ghost
Copy link
Author

ghost commented Apr 20, 2022

Maybe I could merge this with pr 476? What do you think?

@ghost ghost marked this pull request as ready for review April 21, 2022 12:48
@ever0de ever0de requested review from ever0de and panarch April 21, 2022 14:04
@ever0de ever0de assigned ghost Apr 21, 2022
@ever0de ever0de added the enhancement New feature or request label Apr 21, 2022
Copy link
Member

@ever0de ever0de left a comment

Choose a reason for hiding this comment

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

❤️ 👍

core/src/data/value/binary_op/decimal.rs Outdated Show resolved Hide resolved
core/src/data/value/binary_op/decimal.rs Outdated Show resolved Hide resolved
core/src/data/value/binary_op/decimal.rs Outdated Show resolved Hide resolved
core/src/data/value/binary_op/decimal.rs Outdated Show resolved Hide resolved
core/src/data/value/binary_op/f64.rs Outdated Show resolved Hide resolved
Copy link
Member

@ever0de ever0de left a comment

Choose a reason for hiding this comment

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

I think it would be good to improve the match syntax for other options as well.

core/src/data/value/binary_op/decimal.rs Outdated Show resolved Hide resolved
core/src/data/value/binary_op/decimal.rs Outdated Show resolved Hide resolved
core/src/result.rs Outdated Show resolved Hide resolved
core/src/result.rs Outdated Show resolved Hide resolved
@ghost ghost requested a review from ever0de April 27, 2022 19:32
Copy link
Member

@ever0de ever0de left a comment

Choose a reason for hiding this comment

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

In the logic part, it looks good, so I'll leave the approval first.

Most of the stories in the comments are trivial.

core/src/data/value/binary_op/decimal.rs Show resolved Hide resolved
core/src/result.rs Outdated Show resolved Hide resolved
core/src/data/value/binary_op/decimal.rs Outdated Show resolved Hide resolved
core/src/data/value/binary_op/decimal.rs Outdated Show resolved Hide resolved
core/src/data/value/error.rs Outdated Show resolved Hide resolved
Copy link
Member

@panarch panarch left a comment

Choose a reason for hiding this comment

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

Awesome!! This is also really, really meaningful contribution. Thanks a lot!
Also thanks for the careful review @ever0de

Merging 👍 👍 👍

@panarch panarch merged commit 5d5217a into gluesql:main May 1, 2022
@panarch panarch changed the title Decimal math More numeric binary operations with Decimal May 9, 2022
@ghost ghost deleted the decimal_math branch June 3, 2022 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants