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: Fix panic using scan_parquet().with_row_index() with hive partitioning enabled #19865

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Nov 19, 2024

Fixes #19861

This error occurs in the merge operation for the case where hive columns are also present in the data file and a with_row_index() is requested.

@nameexhaustion nameexhaustion changed the title fix: Fix panic using scan_parquet().with_row_index() with hive partitioning enabled. fix: Fix panic using scan_parquet().with_row_index() with hive partitioning enabled Nov 19, 2024
@github-actions github-actions bot added title needs formatting fix Bug fix python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Nov 19, 2024
let mut schema_idx_arr = [
reader_schema.index_of(series_arr[0][0].name()).unwrap(),
// `unwrap_or(0)`: The first column could be a row_index column that doesn't exist in the `reader_schema`.
reader_schema.index_of(series_arr[0][0].name()).unwrap_or(0),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fix is here

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.44%. Comparing base (6c34d59) to head (43e4518).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19865      +/-   ##
==========================================
+ Coverage   79.40%   79.44%   +0.03%     
==========================================
  Files        1550     1550              
  Lines      214909   215086     +177     
  Branches     2447     2447              
==========================================
+ Hits       170653   170868     +215     
+ Misses      43699    43661      -38     
  Partials      557      557              

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


🚨 Try these New Features:

@nameexhaustion nameexhaustion marked this pull request as ready for review November 19, 2024 12:33
@ritchie46 ritchie46 merged commit 01fa524 into pola-rs:main Nov 19, 2024
46 of 50 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
Development

Successfully merging this pull request may close these issues.

With Row index not working on scan_parquet with hive partitioned data
2 participants