Add IO runtime support to IcebergPartitionedScan#3
Open
toutane wants to merge 4 commits intocharlesantoine.leger/partitioned-scanfrom
Open
Add IO runtime support to IcebergPartitionedScan#3toutane wants to merge 4 commits intocharlesantoine.leger/partitioned-scanfrom
toutane wants to merge 4 commits intocharlesantoine.leger/partitioned-scanfrom
Conversation
…ionedTableProvider
notfilippo
approved these changes
Apr 7, 2026
Member
notfilippo
left a comment
There was a problem hiding this comment.
looks very good! great job
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.
Summary
This PR implements Option 3 as described in this document and is linked to Jira ticket QECO-1015.
The upstream PR apache#2308 is also related to this feature and would replace the proposed implementation when merged if relevant.
Adds optional IO runtime segregation to
IcebergPartitionedScanandIcebergPartitionedTableProvider, mirroring theIOExecpattern fromdd-datafusion.What
IcebergPartitionedScanio_handle: Option<tokio::runtime::Handle>field, set viawith_io_handle(Handle).execute()spawns the Parquet read (opendal) on the IO runtime and bridges results back to the CPU runtime via anmpsc::channel+ChannelRecordBatchStream.IcebergPartitionedTableProviderwith_io_handle(Handle).scan()'s network I/O (load_table+plan_files) is spawned on the IO runtime viaHandle::spawn(...).await, preventing DNS/HTTP calls from running on the CPU runtime during DataFusion's physical planning phase.Why
When DataFusion runs on a dedicated CPU runtime, opendal and iceberg async I/O must not execute on its threads,doing so causes latency spikes and, in some configurations, a panic (nested
block_on). This is the same problem solved bydd-datafusion'sIOExecwrapper, and this implementation mirrors it directly.Design notes
io_handle: None; the feature is opt-in via the builder method, no behavior change for existing callers.CHANNEL_BUFFER_SIZE = 32provides backpressure between runtimes (mirrorsdd-datafusion'sIOExec).JoinHandlefrom the spawned Parquet-read task is intentionally dropped (detached). Errors are forwarded via the channel; if the task panics,txis dropped and the consumer sees end-of-stream. This matchesdd-datafusion'sIOExecbehaviour.fetch_tasksis extracted as a static method so it can be passed toHandle::spawnwithout capturing&self.