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

depr(python,rust!): Deprecate str.explode in favor of str.split("").explode() #16508

Merged
merged 4 commits into from
May 28, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented May 26, 2024

Closes #14605

It's a bit of an odd function that makes less sense now that our string representation no longer has offsets.

Users should use str.split("").explode() instead.

@github-actions github-actions bot added breaking rust Change that breaks backwards compatibility for the Rust crate deprecation Add a deprecation warning to outdated functionality python Related to Python Polars rust Related to Rust Polars labels May 26, 2024
@stinodego stinodego changed the title depr(python,rust!): Deprecate str.explode depr(python,rust!): Deprecate str.explode in favor of str.split("").explode() May 26, 2024
@stinodego stinodego marked this pull request as ready for review May 26, 2024 22:41
Copy link

codecov bot commented May 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.52%. Comparing base (d856b49) to head (7c6784d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16508      +/-   ##
==========================================
- Coverage   81.53%   81.52%   -0.02%     
==========================================
  Files        1410     1410              
  Lines      185061   184948     -113     
  Branches     2982     2984       +2     
==========================================
- Hits       150885   150772     -113     
  Misses      33660    33660              
  Partials      516      516              

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

Copy link

codspeed-hq bot commented May 26, 2024

CodSpeed Performance Report

Merging #16508 will degrade performances by 15.56%

Comparing depr-str-explode (7c6784d) with main (805acd8)

Summary

❌ 1 regressions
✅ 36 untouched benchmarks

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

Benchmarks breakdown

Benchmark main depr-str-explode Change
test_tpch_q18 11.1 ms 13.1 ms -15.56%

Comment on lines +2396 to +2397
split = self.split("")
return F.when(split.ne_missing([])).then(split).otherwise([""]).explode()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This replaces the existing functionality until it is removed completely.

@ritchie46 ritchie46 merged commit 7cfa80a into main May 28, 2024
28 checks passed
@ritchie46 ritchie46 deleted the depr-str-explode branch May 28, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking rust Change that breaks backwards compatibility for the Rust crate deprecation Add a deprecation warning to outdated functionality python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate str.explode
2 participants