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: Panic reading multiple CSV files from cloud #18056

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/polars-io/src/file_cache/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub fn init_entries_from_uri_list(
let cloud_path = object_path_from_str(&prefix)?;

let object_store =
object_stores[std::cmp::min(i, object_stores.len())].clone();
object_stores[std::cmp::min(i, object_stores.len() - 1)].clone();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

silly mistake 😅

we unfortunately can't add this to our test suite because it needs a real bucket

Copy link

Choose a reason for hiding this comment

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

Happens to the best of us 😅

Copy link

Choose a reason for hiding this comment

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

Thanks for the quick fix!

Copy link
Contributor

Choose a reason for hiding this comment

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

@nameexhaustion Would it make sense to add a test which uses Azurite (using docker) or similar to test reading from "the cloud"? https://github.com/Azure/Azurite

let uri = uri.clone();

Ok(Arc::new(CloudFileFetcher {
Expand Down