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: Support arithmetic between Series with dtype list #17823

Merged
merged 34 commits into from
Sep 23, 2024

Conversation

itamarst
Copy link
Contributor

@itamarst itamarst commented Jul 23, 2024

Fixes #9188
Fixes #14541 (mostly was already done, fixes an edge case involving division)

Also includes improvements to array arithmetic testing.

Followup will add support for adding a scalars to a list (and maybe arrays too?), i.e. broadcasting.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Jul 23, 2024
@itamarst
Copy link
Contributor Author

Ooh that's a real test failure on Windows, and it's a fun test failure.

@itamarst itamarst marked this pull request as draft July 23, 2024 19:44
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 6 lines in your changes missing coverage. Please review.

Project coverage is 79.89%. Comparing base (6561eba) to head (ead35ac).
Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
...polars-core/src/series/arithmetic/list_borrowed.rs 97.50% 3 Missing ⚠️
...-plan/src/plans/conversion/type_coercion/binary.rs 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17823      +/-   ##
==========================================
+ Coverage   79.84%   79.89%   +0.05%     
==========================================
  Files        1518     1519       +1     
  Lines      205576   205758     +182     
  Branches     2892     2895       +3     
==========================================
+ Hits       164132   164397     +265     
+ Misses      40896    40813      -83     
  Partials      548      548              

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

@eitsupi
Copy link
Contributor

eitsupi commented Sep 15, 2024

Perhaps this is a feature addition to Rust so the PR title needs to be changed?

@ritchie46 ritchie46 changed the title feat(python): Support arithmetic between Series with dtype list feat: Support arithmetic between Series with dtype list Sep 15, 2024
@github-actions github-actions bot added the rust Related to Rust Polars label Sep 15, 2024
@itamarst itamarst changed the title feat: Support arithmetic between Series with dtype list feat(rust, python): Support arithmetic between Series with dtype list Sep 16, 2024
@itamarst
Copy link
Contributor Author

I have (hopefully) addressed the review comments.

@itamarst
Copy link
Contributor Author

Note I just added better test coverage, which caught a bug in expression type casting, which I fixed but maybe in the wrong place. See commit 85cc6dd above.

@itamarst itamarst marked this pull request as draft September 20, 2024 15:30
@itamarst itamarst marked this pull request as ready for review September 20, 2024 18:41
@ritchie46 ritchie46 changed the title feat(rust, python): Support arithmetic between Series with dtype list feat: Support arithmetic between Series with dtype list Sep 23, 2024
@ritchie46
Copy link
Member

Thanks @itamarst. This is a great addition. 👍

@ritchie46 ritchie46 merged commit 341df85 into pola-rs:main Sep 23, 2024
28 checks passed
@itamarst
Copy link
Contributor Author

Thanks for all the feedback! Next up finishing up my PR for #8006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add arithmetic for arr namespaces Allow arithmetic operations for list and array type
4 participants