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: boolean filter gave overly large buffers to Bitmap::from_u8_vec #14924

Merged
merged 3 commits into from
Mar 8, 2024

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Mar 8, 2024

Fixes #14914.

This only patches the what triggers this problem however, the real problem is that MutableBitmap has the following invariant:

// invariant: length.saturating_add(7) / 8 == buffer.len();

But it does nothing to ensure that invariant is true during initialization (and I haven't yet checked if it maintains it).

From a cursory glance it does seem to maintain the invariant, and now I also made sure it satisfies the invariant during initialization.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Mar 8, 2024
@orlp orlp changed the title fix: boolean filter gave overly large buffers to from_u8_vec fix: boolean filter gave overly large buffers to Bitmap::from_u8_vec Mar 8, 2024
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.01%. Comparing base (de5bad0) to head (0b31177).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14924      +/-   ##
==========================================
- Coverage   81.01%   81.01%   -0.01%     
==========================================
  Files        1332     1332              
  Lines      172874   172870       -4     
  Branches     2458     2458              
==========================================
- Hits       140058   140051       -7     
- Misses      32347    32350       +3     
  Partials      469      469              

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

@ritchie46 ritchie46 merged commit d9dead6 into pola-rs:main Mar 8, 2024
18 checks passed
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 rust Related to Rust Polars
Projects
None yet
2 participants