polars
polars copied to clipboard
fix: Expr.sign should preserve dtype
Fixes https://github.com/pola-rs/polars/issues/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.
Despite the implementation being written as an if-else chain, the resulting code is branchless: https://rust.godbolt.org/z/zo5TEaYP6.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
bugfix