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: Properly load nested Parquet Statistics #20610

Merged

Conversation

coastalwhite
Copy link
Collaborator

This fixes a bug where nested statistics were incorrectly being loaded as if they were proper values.

Fixes #20510.

@coastalwhite coastalwhite changed the title fix: Properly load nested Parquet Statistics. fix: Properly load nested Parquet Statistics Jan 8, 2025
@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Jan 8, 2025
@coastalwhite coastalwhite force-pushed the fix/parquet-nested-statistics-20510 branch from 5907888 to 56a3263 Compare January 8, 2025 08:27
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All these files are now just merged into statistics.rs

@@ -19,24 +19,12 @@ fn round_trip_opt_stats(
compression: CompressionOptions,
encodings: Vec<Encoding>,
) -> PolarsResult<()> {
let (array, _statistics) = match file {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The statistics were ignored here anyway, so I just removed them.

This fixes a bug where nested statistics were incorrectly being loaded as if
they were proper values.

Fixes pola-rs#20510.
@coastalwhite coastalwhite force-pushed the fix/parquet-nested-statistics-20510 branch from 56a3263 to f0118a6 Compare January 8, 2025 08:37
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 67.96117% with 66 lines in your changes missing coverage. Please review.

Project coverage is 79.04%. Comparing base (92fd75d) to head (d2c682f).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-parquet/src/arrow/read/statistics.rs 66.29% 60 Missing ⚠️
crates/polars-arrow/src/offset.rs 0.00% 3 Missing ⚠️
crates/polars-parquet/src/arrow/read/mod.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20610      +/-   ##
==========================================
+ Coverage   79.00%   79.04%   +0.04%     
==========================================
  Files        1566     1557       -9     
  Lines      221034   220498     -536     
  Branches     2510     2510              
==========================================
- Hits       174618   174292     -326     
+ Misses      45842    45632     -210     
  Partials      574      574              

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

@ritchie46 ritchie46 merged commit 7ddbf3a into pola-rs:main Jan 8, 2025
27 checks passed
@coastalwhite coastalwhite deleted the fix/parquet-nested-statistics-20510 branch January 8, 2025 11:52
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
Development

Successfully merging this pull request may close these issues.

scan_parquet raises PanicError when using collect after filter
2 participants