Skip to content

feat!(storage): Integration Storage trait with FileIO#2116

Open
CTTY wants to merge 3 commits intoapache:mainfrom
CTTY:ctty/update-fileio
Open

feat!(storage): Integration Storage trait with FileIO#2116
CTTY wants to merge 3 commits intoapache:mainfrom
CTTY:ctty/update-fileio

Conversation

@CTTY
Copy link
Collaborator

@CTTY CTTY commented Feb 5, 2026

Which issue does this PR close?

What changes are included in this PR?

  • Update FileIO to hold dyn Storage instead of OpenDalStorage
  • Update FileIOBuilder accordingly
  • Removed Extensions from FileIO
  • Add with_storage_factory in CatalogBuilder and update all implementations accordingly
  • Add an optional dyn StorageFactory to IcebergTableProviderFactory
  • Update other FileIOBuilder usages accordingly

Are these changes tested?

Mostly rely on the existing tests, added some uts for FileIOBuilder

use crate::runtime::runtime;

/// Parse the scheme from a URL and return the appropriate StorageFactory.
fn storage_factory_from_path(path: &str) -> PyResult<Arc<dyn StorageFactory>> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to add storage wrapper for user to better configure the storage backend they want to use. Right now it's hard wired to opendal for simplicity

@CTTY CTTY added the breaking label Feb 6, 2026
@CTTY CTTY force-pushed the ctty/update-fileio branch from 082d2d2 to 7d692d8 Compare February 12, 2026 16:12
@CTTY CTTY marked this pull request as ready for review February 12, 2026 16:23
@CTTY CTTY requested review from Xuanwo and blackmwk February 12, 2026 16:23
@mbutrovich mbutrovich self-requested a review February 25, 2026 16:26
@CTTY CTTY force-pushed the ctty/update-fileio branch from d74a640 to df9dcf0 Compare February 27, 2026 01:05
@CTTY
Copy link
Collaborator Author

CTTY commented Feb 27, 2026

Hi @blackmwk, this PR is to wrap up the phase 1 work of Storage trait and is ready for review

Copy link
Contributor

@blackmwk blackmwk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CTTY for this pr, generally LGTM!


let file_io = FileIO::from_path(&config.warehouse)?
// Use provided factory or default to LocalFsStorageFactory
let factory = storage_factory.unwrap_or_else(|| Arc::new(LocalFsStorageFactory));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think by default we should use OpenDalStroageFactory?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenDalStorageFactory will be moved to iceberg-storage-opendal in the next PR. Using OpenDalStorageFactory here will create a dependency on opendal crate which is not ideal


let file_io = FileIO::from_path(&config.warehouse)?
// Use provided factory or default to LocalFsStorageFactory
let factory = storage_factory.unwrap_or_else(|| Arc::new(LocalFsStorageFactory));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@CTTY CTTY requested a review from blackmwk February 27, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate Storage trait with FileIO and related structs

2 participants