kszucs opened a new pull request, #2528:
URL: https://github.com/apache/iceberg-rust/pull/2528
## Which issue does this PR close?
<!-- No tracking issue; surfaced while wiring an
`iceberg-storage-opendal::OpenDalStorageFactory::Hf` storage backend behind
`SqlCatalog`. Happy to file a follow-up issue if preferred. -->
- Closes #.
## What changes are included in this PR?
Storage-backend keys set on `SqlCatalog` (e.g. authentication tokens, region
overrides) were not reaching the `FileIO`, because `SqlCatalog::new` built the
`FileIO` from the `StorageFactory` alone, dropping the props on the floor.
Authenticated storage backends then saw empty config and rejected writes with
401s.
The fix forwards the catalog props into the `FileIO`:
```rust
let fileio = FileIOBuilder::new(factory)
.with_props(config.props.clone())
.build();
```
This brings `SqlCatalog` into parity with the `RestCatalog`, which already
forwards props through `FileIOBuilder::with_props`. Storage backends ignore
keys they don't recognize, so catalog-only props (`pool.*` etc.) remain
harmless.
## Are these changes tested?
Yes — added unit test `test_storage_props_propagate_to_file_io` in
`crates/catalog/sql/src/catalog.rs` which:
- Builds a `SqlCatalog` with two storage-backend props (one S3-shaped, one
HF-shaped) in the load map.
- Asserts both keys are present in `catalog.fileio.config().props()`.
The test fails on `main` (the props lookup returns `None`) and passes with
this change. Verified locally by reverting the one-line change in the source,
observing the assertion failure, then restoring.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]