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

fix(python): ensure kwargs filter behaviour matches docstring (expect equivalence with eq) #13864

Merged
merged 2 commits into from
Jan 20, 2024

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Jan 19, 2024

Closes #13861.

Frame-level filter was behaving inconsistently with expr.filter and with its own docstring. Should have been using eq instead of eq_missing when accumulating filters from kwargs, and the difference could block predicate pushdown.

Fixed, extending test coverage to validate generation of a suitable UserWarning on use of eq with "None", and to confirm that the query plan doesn't contain a reference to eq_missing.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Jan 19, 2024
Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@alexander-beedie alexander-beedie merged commit 7bea512 into pola-rs:main Jan 20, 2024
11 checks passed
@alexander-beedie alexander-beedie deleted the eq-filter-expr branch January 20, 2024 04:52
r-brink pushed a commit to r-brink/polars that referenced this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New style filter with kwargs doesn't perform predicate pushdown with statistics
2 participants