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

feat: Add typed collection from par iterators #15961

Merged
merged 2 commits into from Apr 30, 2024
Merged

feat: Add typed collection from par iterators #15961

merged 2 commits into from Apr 30, 2024

Conversation

ritchie46
Copy link
Member

This will ensure we keep the dtype equal to the schema.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Apr 30, 2024
// })?
let out: ListChunked = POOL.install(|| iter.collect::<PolarsResult<_>>())?;

#[cfg(debug_assertions)]
Copy link
Member Author

Choose a reason for hiding this comment

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

Currently not enforced yet in release. Will make the switch after a while.

@@ -459,16 +459,6 @@ pub fn repeat(value: PyExpr, n: PyExpr, dtype: Option<Wrap<DataType>>) -> PyResu
value = value.cast(dtype.0);
}

if let Expr::Literal(lv) = &value {
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 should be left to dynamic int.

Copy link

codspeed-hq bot commented Apr 30, 2024

CodSpeed Performance Report

Merging #15961 will improve performances by 24.86%

Comparing par_collect (6df8907) with main (9c96dca)

Summary

⚡ 1 improvements
✅ 12 untouched benchmarks

Benchmarks breakdown

Benchmark main par_collect Change
test_filter2 2.8 ms 2.3 ms +24.86%

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

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

Project coverage is 81.33%. Comparing base (2805eca) to head (6df8907).
Report is 2 commits behind head on main.

Files Patch % Lines
...polars-core/src/chunked_array/from_iterator_par.rs 82.69% 18 Missing ⚠️
crates/polars-plan/src/dsl/function_expr/cum.rs 50.00% 2 Missing ⚠️
crates/polars-lazy/src/dsl/list.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15961      +/-   ##
==========================================
+ Coverage   81.29%   81.33%   +0.04%     
==========================================
  Files        1381     1381              
  Lines      176855   176955     +100     
  Branches     3042     3043       +1     
==========================================
+ Hits       143766   143927     +161     
+ Misses      32606    32545      -61     
  Partials      483      483              
Flag Coverage Δ
python 74.80% <85.71%> (+0.07%) ⬆️
rust 78.45% <85.71%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@ritchie46 ritchie46 merged commit b285a7f into main Apr 30, 2024
25 checks passed
@ritchie46 ritchie46 deleted the par_collect branch April 30, 2024 07:25
@c-peters c-peters added the accepted Ready for implementation label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants