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 scanning from HTTP cloud paths #17571

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

nameexhaustion
Copy link
Collaborator

Closes #17567

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jul 11, 2024
if builder.get_config_value(key).is_none() {
let reg = Regex::new(pattern).unwrap();
let cap = reg.captures(content)?;
let m = cap.get(1)?;
let parsed = m.as_str();
*builder = local.with_config(*key, parsed)
*builder = std::mem::take(builder).with_config(*key, parsed);
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 issue with the config key being incorrectly overwritten. If the code above using ? short circuits then the original config is reset due to mem::take.

futures::future::try_join_all(
(0..if first_uri.starts_with("http") {
// Object stores for http are tied to the path.
uri_list.len()
Copy link
Collaborator Author

@nameexhaustion nameexhaustion Jul 11, 2024

Choose a reason for hiding this comment

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

Fix issue where scanning a list of HTTP paths would just scan the first file N times.

@nameexhaustion nameexhaustion marked this pull request as ready for review July 11, 2024 11:28
@nameexhaustion
Copy link
Collaborator Author

I learned this today but the CloudLocation returned for a http path is blank 😂

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

Attention: Patch coverage is 24.00000% with 19 lines in your changes missing coverage. Please review.

Project coverage is 80.49%. Comparing base (a55d9bc) to head (75a004d).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/polars-io/src/file_cache/utils.rs 10.52% 17 Missing ⚠️
crates/polars-io/src/cloud/options.rs 0.00% 1 Missing ⚠️
crates/polars-io/src/utils/path.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17571   +/-   ##
=======================================
  Coverage   80.49%   80.49%           
=======================================
  Files        1483     1483           
  Lines      195171   195203   +32     
  Branches     2778     2778           
=======================================
+ Hits       157099   157135   +36     
+ Misses      37561    37557    -4     
  Partials      511      511           

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

@ritchie46 ritchie46 merged commit baae870 into pola-rs:main Jul 11, 2024
21 checks passed
@nameexhaustion nameexhaustion deleted the scan-http branch July 19, 2024 12:23
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.

CSV scan from HTTP fails with ComputeError: empty host
2 participants