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: Incorrect lazy CSV select(len()) for compressed files #18067

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Aug 7, 2024

Fixes #18057
Fixes #18070

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Aug 7, 2024
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.35%. Comparing base (3dda47e) to head (abb2bfb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18067      +/-   ##
==========================================
- Coverage   80.37%   80.35%   -0.02%     
==========================================
  Files        1496     1496              
  Lines      197542   197545       +3     
  Branches     2820     2820              
==========================================
- Hits       158771   158735      -36     
- Misses      38249    38288      +39     
  Partials      522      522              

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

@nameexhaustion nameexhaustion marked this pull request as ready for review August 7, 2024 07:49
@nameexhaustion nameexhaustion marked this pull request as draft August 7, 2024 07:51
@@ -47,9 +47,9 @@ pub fn get_reader_bytes<'a, R: Read + MmapBytesReader + ?Sized>(
///
/// # Safety
/// The `out` vec outlives `bytes` (declare `out` first).
pub unsafe fn maybe_decompress_bytes<'a>(
pub fn maybe_decompress_bytes<'a, 'b: 'a>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

learned new things about lifetimes recently 😁

Copy link
Member

Choose a reason for hiding this comment

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

Then we can remove the # Safety comment as well. 👍

Copy link
Collaborator Author

@nameexhaustion nameexhaustion Aug 7, 2024

Choose a reason for hiding this comment

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

Have removed

actually, now I realize even 'a is enough

Choose a reason for hiding this comment

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

Format
Page

break;
}

reader_bytes = &reader_bytes[1..];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

skip empty lines at the start

@nameexhaustion nameexhaustion marked this pull request as ready for review August 7, 2024 12:38
@ritchie46 ritchie46 merged commit 3055ee6 into pola-rs:main Aug 8, 2024
26 checks passed
@nameexhaustion nameexhaustion deleted the csv-compressed-count branch August 29, 2024 09:58
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
3 participants