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

.list.index_of_in() architectural review PR #20733

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

itamarst
Copy link
Contributor

This PR implements a sketch of .list.index_of_in() as described in #20626

The questions I would definitely like feedback on at the moment are:

  1. Is using amortized_iter() the right approach?
  2. Is using needles.iter() the right approach?

@itamarst
Copy link
Contributor Author

It's also possible the casting logic in Polars will need to be extended; CastingRules::FirstArgLossless isn't what we want since it casts the needles e.g. to List[Int64], we'd need some new option like CastingRules::FirstArgInnerLossless or something that casts to the inner type of the first argument.

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 93.24324% with 5 lines in your changes missing coverage. Please review.

Project coverage is 79.70%. Comparing base (958d00f) to head (9fc4d5f).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...s/polars-ops/src/chunked_array/list/index_of_in.rs 91.83% 4 Missing ⚠️
crates/polars-plan/src/dsl/function_expr/list.rs 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20733      +/-   ##
==========================================
- Coverage   79.75%   79.70%   -0.05%     
==========================================
  Files        1561     1562       +1     
  Lines      221785   222004     +219     
  Branches     2530     2530              
==========================================
+ Hits       176885   176955      +70     
- Misses      44318    44467     +149     
  Partials      582      582              

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants