feat: Add Tencent Cloud COS (cosn://, cos://) FileIO support (#3239)#3242
Open
acake88 wants to merge 1 commit intoapache:mainfrom
Open
feat: Add Tencent Cloud COS (cosn://, cos://) FileIO support (#3239)#3242acake88 wants to merge 1 commit intoapache:mainfrom
acake88 wants to merge 1 commit intoapache:mainfrom
Conversation
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.
Rationale for this change
Tencent Cloud Object Storage (COS) is one of the major object storage services in China, widely used in big data workloads with Spark, Flink, and Hive. Hadoop already supports
cosn://scheme natively via hadoop-cos, but PyIceberg currently has no COS support — users cannot access Iceberg tables stored on COS from Python.This PR adds COS as a storage backend via the fsspec-compatible
cosfslibrary, following the exact same pattern as existing integrations (S3 vias3fs, Azure viaadlfs, GCS viagcsfs, HuggingFace viahuggingface-hub).Changes:
pyiceberg/io/__init__.py: Added 5 COS configuration properties (cos.secret-id,cos.secret-key,cos.session-token,cos.region,cos.endpoint) and registeredcosn:///cos://schemes inSCHEMA_TO_FILE_IOpyiceberg/io/fsspec.py: Added_cosn()factory function and registeredcosn/cosinSCHEME_TO_FSpyproject.toml: Addedcosfs>=2026.3.25as an optional dependencyRationale for this change
Tencent Cloud Object Storage (COS) is one of the major object storage services in China, widely used in big data workloads with Spark, Flink, and Hive. Hadoop already supports cosn:// scheme natively via hadoop-cos, but PyIceberg currently has no COS support — users cannot access Iceberg tables stored on COS from Python.
This PR adds COS as a storage backend via the fsspec-compatible cosfs library, following the exact same pattern as existing integrations (S3 via s3fs, Azure via adlfs, GCS via gcsfs, HuggingFace via huggingface-hub).