feat(datafusion): add try_new_with_runtime to route catalog IO off the caller's runtime#20
Merged
Conversation
…gTableProvider Adds `try_new_with_runtime` to `IcebergTableProvider`, `IcebergSchemaProvider`, and `IcebergCatalogProvider`. When a `Runtime` is supplied, the IO-bound work in `scan` (catalog reload, `plan_files`, manifest fetches) and `insert_into` (catalog reload) is spawned on `runtime.io()` via a new `run_on_io` helper, so the calling runtime — typically DataFusion's CPU runtime in a split setup — only awaits a join handle. The existing `try_new` signatures are unchanged.
notfilippo
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When DataFusion runs with a CPU/IO split runtime, catalog IO (
load_table,plan_files, manifest fetches) runs on the CPU runtime by default, which can cause blocking or starvation.Changes
Adds
try_new_with_runtime(…, runtime: Option<Runtime>)toIcebergTableProvider,IcebergSchemaProvider, andIcebergCatalogProvider.When a
Runtimeis provided, all IO-bound work is dispatched toruntime.io()via a newrun_on_iohelper:scan:load_table+plan_files+ manifest fetchesinsert_into:load_tableThe existing
try_newsignatures are unchanged (they delegate totry_new_with_runtime(…, None)), so this is fully backward-compatible.