polars icon indicating copy to clipboard operation
polars copied to clipboard

feat(rust!): rename ChunkedArray.try_apply to ChunkedArray.try_apply_values

Open MarcoGorelli opened this issue 1 year ago • 2 comments

I think this one is named a little misleadingly, as for apply there's:

  • ChunkedArray.apply: run function on non-null values
  • ChunkedArray.apply_values: run function on all values

But ChunkedArray.try_apply runs a fallible function on all values

I'd suggest renaming it to try_apply_values, and then later introducing try_apply which runs a fallible function on non-null values (which would be useful in addressing https://github.com/pola-rs/polars/issues/11579)

MarcoGorelli avatar Mar 09 '24 14:03 MarcoGorelli

Codecov Report

Attention: Patch coverage is 80.00000% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 81.22%. Comparing base (e204928) to head (af68877). Report is 4 commits behind head on main.

Files Patch % Lines
crates/polars-core/src/chunked_array/ops/apply.rs 33.33% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14947      +/-   ##
==========================================
+ Coverage   81.21%   81.22%   +0.01%     
==========================================
  Files        1348     1348              
  Lines      175318   175332      +14     
  Branches     2506     2508       +2     
==========================================
+ Hits       142390   142422      +32     
+ Misses      32448    32431      -17     
+ Partials      480      479       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 09 '24 15:03 codecov[bot]

Thanks, I wan to wait a bit with merging so we can still patch non-breaking rust versions.

ritchie46 avatar Mar 10 '24 07:03 ritchie46