From d0b7df611ada498fe2a327952815da7e22d063af Mon Sep 17 00:00:00 2001 From: SANTHOSH-SACHIN Date: Sun, 21 Jun 2026 02:20:19 +0530 Subject: [PATCH] fix: use ambient tokio runtime in ParquetObjectReader::spawn (#8231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When ParquetObjectReader is constructed without an explicit runtime, spawn() would run async closures inline — this breaks object store implementations (S3, HTTP) that rely on tokio::spawn for connection pooling and DNS resolution. The fix tries Handle::try_current() to discover an ambient tokio runtime before falling back to inline execution. --- parquet/src/arrow/async_reader/store.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parquet/src/arrow/async_reader/store.rs b/parquet/src/arrow/async_reader/store.rs index d47ca744d8f6..73cb129bf5e9 100644 --- a/parquet/src/arrow/async_reader/store.rs +++ b/parquet/src/arrow/async_reader/store.rs @@ -148,7 +148,8 @@ impl ParquetObjectReader { O: Send + 'static, E: Into + Send + 'static, { - match &self.runtime { + let handle = self.runtime.clone().or_else(|| Handle::try_current().ok()); + match handle { Some(handle) => { let path = self.path.clone(); let store = Arc::clone(&self.store);