feat: add HF Storage Bucket support via OpenDAL#3
Open
davanstrien wants to merge 97 commits intofeature/hf-bucket-sinkfrom
Open
feat: add HF Storage Bucket support via OpenDAL#3davanstrien wants to merge 97 commits intofeature/hf-bucket-sinkfrom
davanstrien wants to merge 97 commits intofeature/hf-bucket-sinkfrom
Conversation
…_slice_unchecked` (pola-rs#26928)
…ola-rs#26938) Co-authored-by: gabriel <gabriel.g.robin@airbus.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: moktamd <moktamd@users.noreply.github.com> Co-authored-by: nameexhaustion <simonlin.rqmmw@slmail.me>
…oes not begin with base path, or contains '..' (pola-rs#26894)
…6764) Co-authored-by: Simon Lin <simonlin.rqmmw@slmail.me>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: nameexhaustion <simonlin.rqmmw@slmail.me>
…Series.__setitem__ (pola-rs#27092)
…#27104) Co-authored-by: Orson Peters <orsonpeters@gmail.com>
pola-rs#27087) Co-authored-by: nameexhaustion <simonlin.rqmmw@slmail.me>
Co-authored-by: Dani Pinyol <dani@avatarcognition.com>
…la-rs#27118) Co-authored-by: Orson Peters <orsonpeters@gmail.com>
Add an ObjectStore implementation for `hf://` URLs backed by OpenDAL's
HF service, enabling `sink_parquet("hf://buckets/org/name/file.parquet")`
to stream directly to Hugging Face Storage Buckets.
The implementation follows the same pattern as existing cloud backends
(S3/GCS/Azure): a `build_hf()` function in a new `hf.rs` module
constructs the ObjectStore, and `object_store_setup.rs` calls it from
the `CloudType::Hf` match arm. HF URLs flow through the standard
FileSink path with no custom sink node or IR special-casing.
New files:
- crates/polars-io/src/cloud/hf.rs — URL parsing, token resolution,
OpenDAL ObjectStore construction
Feature flag: `hf` (opt-in, propagated through the workspace)
Dependencies: opendal + object_store_opendal (local path deps for now,
will switch to published crate versions once apache/opendal#7185 ships)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Point opendal and object_store_opendal at kszucs/opendal@4c70bd8 (hf-revamp branch) which uses published hf-xet 1.5.0 from crates.io. Once apache/opendal#7185 merges and publishes, these become simple version deps (e.g. opendal = "0.56"). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Manual dispatch workflow that builds Linux x64 and ARM64 wheels with the hf feature enabled via maturin. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
apache/opendal#7185 merged today — HF backend XET support is now on upstream main. Pin to commit 8d3dbcc3ef until a release ships. Next: once opendal publishes a release with services-hf, swap these git deps for a version number (opendal = "0.56" or whatever ships). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Add
hf://URL support for Polars cloud writes via OpenDAL, enabling:Approach
Follows the same pattern as existing cloud backends (S3/GCS/Azure):
crates/polars-io/src/cloud/hf.rs— URL parsing, token resolution, OpenDAL ObjectStore constructionobject_store_setup.rs— 6-lineCloudType::Hfmatch arm callingbuild_hf()hfpropagated through workspace Cargo.toml chainHF URLs flow through the standard FileSink — no custom sink node, no IR special-casing.
Dependencies
Using local path deps for
opendalandobject_store_opendalduring development. Will swap to published crate versions once apache/opendal#7185 ships.Test plan
cargo check -p polars-stream --features hfcompilescargo check -p polars-streamno regression without feature🤖 Generated with Claude Code