JingsongLi commented on code in PR #204:
URL: https://github.com/apache/paimon-rust/pull/204#discussion_r3036861722


##########
crates/integrations/datafusion/src/table/mod.rs:
##########
@@ -125,7 +113,16 @@ impl TableProvider for PaimonTableProvider {
             read_builder.with_limit(limit);
         }
         let scan = read_builder.new_scan();
-        let plan = scan.plan().await.map_err(to_datafusion_error)?;
+        // DataFusion's Python FFI may poll `TableProvider::scan()` without an 
active
+        // Tokio runtime. `scan.plan()` can reach OpenDAL/Tokio filesystem 
calls while
+        // reading Paimon metadata, so we must provide a runtime here instead 
of
+        // assuming the caller already entered one.
+        let plan = await_with_runtime(

Review Comment:
   `scan()` itself is an asynchronous fn, and the DataFusion FFI uses the 
runtime handle passed by FFI_CatalogProvider to poll it, so there is no need to 
do a runtime fallback here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to