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

refactor: Improve safety of amortized_iter #16820

Merged
merged 5 commits into from
Jun 8, 2024
Merged

refactor: Improve safety of amortized_iter #16820

merged 5 commits into from
Jun 8, 2024

Conversation

ritchie46
Copy link
Member

Removes a ton of unsafe tags and make UnstableSeries (now AmortSeries) cloneable. If cloned the Rc will be larger than 1 and the iterator will invalidate it's series_container and will create a new one. This almost never happens, currently only 1 test hits that.

If not the AmortSeries, but the underlying Series is cloned we also notice that by checking the underlying Arc and invalidating the iterators local container.

@itamarst FYI.

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Jun 8, 2024
Copy link

codecov bot commented Jun 8, 2024

Codecov Report

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

Project coverage is 81.38%. Comparing base (38149d6) to head (7abb871).

Files Patch % Lines
crates/polars-plan/src/dsl/function_expr/list.rs 89.28% 3 Missing ⚠️
crates/polars-expr/src/expressions/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16820      +/-   ##
==========================================
- Coverage   81.39%   81.38%   -0.02%     
==========================================
  Files        1424     1424              
  Lines      187623   187594      -29     
  Branches     2691     2691              
==========================================
- Hits       152719   152672      -47     
- Misses      34409    34427      +18     
  Partials      495      495              

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

Copy link

codspeed-hq bot commented Jun 8, 2024

CodSpeed Performance Report

Merging #16820 will improve performances by 20.45%

Comparing unstable (7abb871) with main (38149d6)

Summary

⚡ 1 improvements
✅ 36 untouched benchmarks

Benchmarks breakdown

Benchmark main unstable Change
test_groupby_h2oai_q7 2.5 ms 2 ms +20.45%

@ritchie46 ritchie46 merged commit fa12a8e into main Jun 8, 2024
27 checks passed
@ritchie46 ritchie46 deleted the unstable branch June 8, 2024 09:43
@c-peters c-peters added the accepted Ready for implementation label Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants