[PoC] Unify file I/O behind a storage entry point - #25194
Open
Xuanwo wants to merge 1 commit into
Open
Conversation
Xuanwo
marked this pull request as ready for review
September 11, 2026 14:05
Member
Author
|
cc @alamb @AdamGS for a look. As explained in the PR description, I'm just trying to give you a feeling of what TBH, I have many new ideas for this new trait, but I think it's better to establish a good starting point before I go further. Once we have a |
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.
Architecture at a glance
Register a backend once; route the existing file APIs through the same storage entry point. This diagram illustrates the PoC direction, not a finalized API.
Contracts, SDK dependencies, and a suggested reading path
Start with the Storage contract and FileReader, then follow either the ObjectStore adapter or the OpenDAL adapter. The integration tests show how applications use the common entry point.
Which issue does this PR close?
Related to #14854 and #25144. This PoC does not close either discussion.
Rationale for this change
This is a PoC to demonstrate my initial ideas, and the API is not final. The main goal is to bring file I/O calls currently scattered throughout DataFusion behind one common entry point, so applications can register a storage backend once and use it across the existing file APIs.
The API largely carries over the operations DataFusion already uses. It is a starting point for discussing the dependency boundary and integration model, with substantial room for future optimization and API changes. I would especially appreciate feedback on whether this direction provides the right place to integrate existing
object_storeclients, OpenDAL operators, and custom storage implementations.What changes are included in this PR?
datafusion-storagecrate withStoragefor namespace operations,FileReaderfor reads, and TokioAsyncWritefor outputs. Shared file metadata and paths no longer depend on SDK types.COPY TO, and file tableINSERTthrough the same registration and storage binding. Applications useregister_storageonce and continue using the ordinary format APIs.object_storeand OpenDAL adapters. Existing SDK clients retain their configuration and middleware; backend features control adapter assembly instead of adding conditional branches throughout file operations.object_storenormal dependency, while preserving native operations such as batched ranges, suffix reads, delimiter listing, and backend writer buffering.The storage README describes the interfaces, registration model, and current limits. In this PoC, Avro and sequential Arrow IPC buffer complete inputs, including local files, after removing the SDK-specific local payload path.
What is the testing strategy for this PR?
Local validation completed:
object_storepackage.datafusion/core/tests/datasource/object_store_access.rs.These tests cover local and in-memory backends and mocked services; they do not constitute cloud-service qualification. No performance improvement is claimed.
Are there any user-facing changes?
Yes. This PoC makes breaking changes to registration and file I/O extension APIs, including replacing
register_object_storewithregister_storageand removing SDK types from shared file interfaces.This PoC does not address compatibility or migration. If this direction proves viable, I will separately design a roadmap for migrating the community to the new API. The changes here are intended to make the initial idea concrete and reviewable, not to establish the final API or migration plan.