jackylee-ch commented on code in PR #10190:
URL: https://github.com/apache/paimon/pull/10190#discussion_r4180223077
##########
paimon-python/pypaimon/read/reader/format_vortex_reader.py:
##########
@@ -45,9 +45,18 @@ def __init__(self, file_io: FileIO, file_path: str,
read_fields: List[DataField]
file_path_for_vortex, store_kwargs = to_vortex_specified(file_io,
file_path)
if store_kwargs:
+ from urllib.parse import urlparse
+
from vortex import store
vortex_store = store.from_url(file_path_for_vortex, **store_kwargs)
- vortex_file = vortex_store.open()
+ # vortex 0.70.0 object stores (S3Store et al.) expose no
``.open()``;
+ # the entry point is ``vortex.open(path, store=...)``. The store is
+ # virtual-hosted (the bucket is in the endpoint host), so ``path``
must
+ # be the object key relative to that store, not the full
+ # ``s3://bucket/key`` URL -- otherwise the bucket is resolved
twice and
+ # the read fails.
+ object_key = urlparse(file_path_for_vortex).path.lstrip("/")
+ vortex_file = vortex.open(object_key, store=vortex_store)
Review Comment:
Fixed in 918b16c8c — switched to vortex.open("", store=vortex_store),
keeping the file-prefixed store, so it resolves to exactly the prefixed key
instead of appending it again. The fake-SDK test now models the prefix
contract: an empty path resolves to the single real object key; any non-empty
path (the key or the full URL) resolves to a doubled, non-existent key and
raises 404. So it rejects the doubled-key call the old assertion accepted, and
reverting to the object-key open reproduces the 404 locally. The real
pinned-SDK OSS read stays covered in the native CI lane.
--
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]