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: Handle strictness for Decimal Series construction #15309

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Mar 26, 2024

Ref #14427

Changes

  • Implement casting for AnyValue to Decimal
  • Update AnyValue constructors to properly apply the strict parameter. This means that the following will raise unless strict=False is set:
    • Mixing Decimals with non-decimals
    • Mixing Decimals with different scales
    • Decimals that do not match the given dtype

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Mar 26, 2024
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 86.44068% with 8 lines in your changes missing coverage. Please review.

Project coverage is 80.99%. Comparing base (7ebcfab) to head (bbe5fc7).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/polars-core/src/series/any_value.rs 82.85% 6 Missing ⚠️
crates/polars-core/src/datatypes/any_value.rs 89.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15309      +/-   ##
==========================================
+ Coverage   80.98%   80.99%   +0.01%     
==========================================
  Files        1445     1445              
  Lines      189925   189959      +34     
  Branches     2712     2713       +1     
==========================================
+ Hits       153808   153859      +51     
+ Misses      35618    35601      -17     
  Partials      499      499              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codspeed-hq bot commented Jun 14, 2024

CodSpeed Performance Report

Merging #15309 will degrade performances by 18.08%

Comparing av-strict-decimal (bbe5fc7) with main (7ebcfab)

Summary

❌ 1 regressions
✅ 36 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main av-strict-decimal Change
test_groupby_h2oai_q5 1.9 ms 2.3 ms -18.08%

@stinodego stinodego marked this pull request as ready for review June 14, 2024 11:53
@stinodego stinodego marked this pull request as draft June 14, 2024 12:41
@stinodego stinodego marked this pull request as ready for review June 14, 2024 13:08
@ritchie46 ritchie46 merged commit 687dee3 into main Jun 14, 2024
29 checks passed
@ritchie46 ritchie46 deleted the av-strict-decimal branch June 14, 2024 13:23
@c-peters c-peters added the accepted Ready for implementation label Jun 16, 2024
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants