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: Add a TypeCheckRule to the optimizer #20425

Merged
merged 4 commits into from
Dec 24, 2024

Conversation

coastalwhite
Copy link
Collaborator

This PR fixes #17391 by properly adding a TypeCheckRule to the ConversionOptimizer that will verify that filters have a Boolean datatype.

This already caught #20424.

In the future, this can be expanded to type check additional parts of the IR such as arithmetic operators.

This PR fixes pola-rs#17391 by properly adding a `TypeCheckRule` to the
`ConversionOptimizer` that will verify that `filters` have a `Boolean`
datatype.

This already caught pola-rs#20424.

In the future, this can be expanded to type check additional parts of the IR
such as arithmetic operators.
@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Dec 23, 2024
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 90.32258% with 15 lines in your changes missing coverage. Please review.

Project coverage is 79.02%. Comparing base (2ae01fb) to head (ea57c31).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...polars-plan/src/plans/conversion/type_check/mod.rs 65.38% 9 Missing ⚠️
...s-plan/src/plans/optimizer/collapse_and_project.rs 83.33% 3 Missing ⚠️
...ates/polars-plan/src/plans/conversion/stack_opt.rs 88.23% 2 Missing ⚠️
crates/polars-plan/src/plans/conversion/mod.rs 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20425      +/-   ##
==========================================
+ Coverage   78.98%   79.02%   +0.03%     
==========================================
  Files        1562     1563       +1     
  Lines      220103   220246     +143     
  Branches     2486     2488       +2     
==========================================
+ Hits       173855   174043     +188     
+ Misses      45675    45630      -45     
  Partials      573      573              

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

@ritchie46 ritchie46 merged commit 9ea5839 into pola-rs:main Dec 24, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when filtering by non-boolean
2 participants