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

perf: Use bitmask to filter Parquet predicate-pushdown items #17993

Merged
merged 8 commits into from
Aug 5, 2024

Conversation

coastalwhite
Copy link
Collaborator

@coastalwhite coastalwhite commented Aug 1, 2024

This adds the prefiltered option to scan_parquet(parallel='...') which first evaluates the predicates and then only reads the relevant rows. For large files with predicates that are clustered or biased towards selecting or not-selecting, this provides a significant speed-up.

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Aug 1, 2024
Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 24.50704% with 268 lines in your changes missing coverage. Please review.

Project coverage is 80.39%. Comparing base (f4e2a09) to head (06f409a).
Report is 19 commits behind head on main.

Files Patch % Lines
crates/polars-io/src/parquet/read/read_impl.rs 10.10% 178 Missing ⚠️
...rs-parquet/src/parquet/encoding/hybrid_rle/fuzz.rs 0.00% 47 Missing ⚠️
...arquet/src/parquet/encoding/hybrid_rle/buffered.rs 0.00% 11 Missing ⚠️
...rs-parquet/src/arrow/read/deserialize/utils/mod.rs 28.57% 5 Missing ⚠️
...s-parquet/src/parquet/encoding/bitpacked/decode.rs 28.57% 5 Missing ⚠️
crates/polars-utils/src/vec.rs 90.74% 5 Missing ⚠️
.../src/physical_plan/streaming/construct_pipeline.rs 0.00% 4 Missing ⚠️
crates/polars-expr/src/expressions/mod.rs 0.00% 3 Missing ⚠️
...src/executors/sinks/group_by/aggregates/convert.rs 0.00% 3 Missing ⚠️
crates/polars-pipe/src/pipeline/convert.rs 0.00% 3 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17993      +/-   ##
==========================================
- Coverage   80.49%   80.39%   -0.11%     
==========================================
  Files        1496     1496              
  Lines      196728   197480     +752     
  Branches     2817     2820       +3     
==========================================
+ Hits       158360   158759     +399     
- Misses      37847    38199     +352     
- Partials      521      522       +1     

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

@ritchie46 ritchie46 merged commit ca6d46c into pola-rs:main Aug 5, 2024
27 checks passed
@c-peters c-peters added the accepted Ready for implementation label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants