-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: Avoid blocking on async runtime when resolving cloud scans #20750
fix: Avoid blocking on async runtime when resolving cloud scans #20750
Conversation
9d7d20b
to
bc5e67f
Compare
Not sure if it's related but on 0.46.0 I just tried scanning s3 lazily and it panicked with: panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-io-0.46.0/src/pl_async.rs:310:9:
can call blocking only when running on the multi-threaded runtime example: let s3_uri = format!("s3://{}/{}", bucket, key);
let cloud_options = CloudOptions::default().with_aws(config_keys);
let scan_args = ScanArgsParquet {
cloud_options: Some(cloud_options),
glob,
..ScanArgsParquet::default()
};
Ok(LazyFrame::scan_parquet(s3_uri, scan_args).unwrap()) |
full backtrace:
|
@ritchie46 could this be an edge case not accounted for? The workaround is to instead: let lf = tokio::task::spawn_blocking(|| {
LazyFrame::scan_parquet(s3_uri, scan_args)
.unwrap()
.collect()
.unwrap()
})
.await
.unwrap().lazy(); But that's not great as it involves |
No description provided.