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

feat: Exclude directories from glob expansion result #17174

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Jun 25, 2024

Resolves #17105

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Jun 25, 2024
.then(|entry| async { Ok::<_, PolarsError>(entry.map_err(to_compute_err)?.location) })
.filter(|name| ready(name.as_ref().map_or(true, |name| matcher.is_matching(name))))
.try_collect()
.await?;
locations.sort_unstable();
Copy link
Collaborator Author

@nameexhaustion nameexhaustion Jun 25, 2024

Choose a reason for hiding this comment

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

We did not previously use this function async fn glob in our test suite even with FORCE_ASYNC, but in this PR we do, which led to lots of test failures as the files were not read in a consistent order due to not being sorted.

#[cfg(not(feature = "cloud"))]
{
panic!("activate cloud feature")
}

#[cfg(feature = "cloud")]
{
if !is_cloud && verbose {
if force_async && verbose {

This comment was marked as outdated.

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 93.87755% with 6 lines in your changes missing coverage. Please review.

Project coverage is 80.85%. Comparing base (4d2f928) to head (d5a82fc).

Files Patch % Lines
crates/polars-lazy/src/scan/file_list_reader.rs 94.87% 4 Missing ⚠️
crates/polars-io/src/cloud/glob.rs 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17174      +/-   ##
==========================================
+ Coverage   80.82%   80.85%   +0.02%     
==========================================
  Files        1466     1466              
  Lines      192313   192378      +65     
  Branches     2745     2745              
==========================================
+ Hits       155446   155553     +107     
+ Misses      36364    36322      -42     
  Partials      503      503              

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

@@ -164,7 +164,6 @@ impl Matcher {
}
}

#[tokio::main(flavor = "current_thread")]
Copy link
Member

Choose a reason for hiding this comment

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

Nice. This felt iffy to me.

@ritchie46 ritchie46 merged commit 1252e4a into pola-rs:main Jun 28, 2024
27 checks passed
@nameexhaustion nameexhaustion deleted the glob-dir-excl branch July 8, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclude directories from expanded glob result
2 participants