Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pyiceberg/io/pyarrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@

T = TypeVar("T")

def _remove_section_between_at_and_slash(s):
# Remove everything from "@" (inclusive) to the first following "/" (exclusive)
result = re.sub(r'@[^/]+/', '/', s)
return result

@lru_cache
def _cached_resolve_s3_region(bucket: str) -> Optional[str]:
Expand Down Expand Up @@ -279,7 +283,7 @@ class PyArrowFile(InputFile, OutputFile):

def __init__(self, location: str, path: str, fs: FileSystem, buffer_size: int = ONE_MEGABYTE):
self._filesystem = fs
self._path = path
self._path = _remove_section_between_at_and_slash(path)
self._buffer_size = buffer_size
super().__init__(location=location)

Expand Down
Loading