polars icon indicating copy to clipboard operation
polars copied to clipboard

fix: Expr.sign should preserve dtype

Open orlp opened this issue 1 year ago • 2 comments

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.

orlp avatar Aug 28 '24 20:08 orlp

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

orlp avatar Aug 28 '24 20:08 orlp

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.

codecov[bot] avatar Aug 28 '24 21:08 codecov[bot]

bugfix

ritchie46 avatar Aug 29 '24 09:08 ritchie46