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(python): Add PerformanceWarning to LazyFrame properties #16964

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Jun 14, 2024

Closes #16328

Changes

  • Add new PerformanceWarning warning. This is a base class for some other warnings, including PolarsInefficientMapWarning and CategoricalRemappingWarning.
  • Make LazyFrame properties emit a warning, informing the user of the potential performance cost, and redirecting to LazyFrame.collect_schema.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Jun 14, 2024
Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.02%. Comparing base (687dee3) to head (153b69c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16964   +/-   ##
=======================================
  Coverage   81.02%   81.02%           
=======================================
  Files        1445     1445           
  Lines      190134   190144   +10     
  Branches     2712     2712           
=======================================
+ Hits       154050   154064   +14     
+ Misses      35585    35581    -4     
  Partials      499      499           

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

@ritchie46 ritchie46 merged commit 9af88f1 into main Jun 14, 2024
18 checks passed
@ritchie46 ritchie46 deleted the lf-property-warnings branch June 14, 2024 15:45
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LazyFrame properties now require significant compute - update API to reflect this
2 participants