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.sign should preserve dtype #18446

Merged
merged 3 commits into from
Aug 29, 2024
Merged

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Aug 28, 2024

Fixes #18444.

Before merging we should decide if this is a bugfix or if this is a backwards-incompatible breaking change blocked on 2.0, so I marked this as do-not-merge.

@orlp orlp added the do not merge This pull requests should not be merged right now label Aug 28, 2024
@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Aug 28, 2024
@orlp
Copy link
Collaborator Author

orlp commented Aug 28, 2024

Despite the implementation being written as an if-else chain, the resulting code is branchless: https://rust.godbolt.org/z/zo5TEaYP6.

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.86%. Comparing base (37a492e) to head (b2fbf74).
Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18446      +/-   ##
==========================================
- Coverage   79.92%   79.86%   -0.07%     
==========================================
  Files        1495     1496       +1     
  Lines      200279   200359      +80     
  Branches     2867     2867              
==========================================
- Hits       160081   160014      -67     
- Misses      39652    39799     +147     
  Partials      546      546              

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

@ritchie46 ritchie46 removed the do not merge This pull requests should not be merged right now label Aug 29, 2024
@ritchie46 ritchie46 merged commit b3172aa into pola-rs:main Aug 29, 2024
27 checks passed
@ritchie46
Copy link
Member

bugfix

r-brink pushed a commit to r-brink/polars that referenced this pull request Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Float32 changes to Float64 implicitly
2 participants