luoyuxia commented on code in PR #204:
URL: https://github.com/apache/paimon-rust/pull/204#discussion_r3036908795
##########
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:
I initially thought the same, but turns out not, Seems not all async FFI
entry points propagate the runtime —
Without the await_with_runtime fallback, scan.plan() would panic at runtime
for no active runtime on the thread.
--
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]