From 83470e0f91f5fa5af20d1e4cc8beac844b1cb750 Mon Sep 17 00:00:00 2001 From: Colin Ho Date: Tue, 3 Dec 2024 18:03:09 -0800 Subject: [PATCH] [BUG] Block on parquet schema future in estimate_size_bytes (#3484) Co-authored-by: Colin Ho --- src/daft-scan/src/python.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/daft-scan/src/python.rs b/src/daft-scan/src/python.rs index da1ff8f63e..f23c295ad0 100644 --- a/src/daft-scan/src/python.rs +++ b/src/daft-scan/src/python.rs @@ -524,13 +524,15 @@ pub mod pylib { columns: Option>, has_metadata: Option, ) -> PyResult { - let (schema, metadata) = daft_parquet::read::read_parquet_schema( - uri, - default::Default::default(), - None, - default::Default::default(), - None, - )?; + let io_runtime = common_runtime::get_io_runtime(true); + let (schema, metadata) = + io_runtime.block_on_current_thread(daft_parquet::read::read_parquet_schema( + uri, + default::Default::default(), + None, + default::Default::default(), + None, + ))?; let data_source = DataSource::File { path: uri.to_string(), chunk_spec: None,