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
4 changes: 3 additions & 1 deletion pyiceberg/io/pyarrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ def parse_location(location: str, properties: Properties = EMPTY_DICT) -> tuple[
"""
uri = urlparse(location)

if not uri.scheme:
if not uri.scheme or (len(uri.scheme) == 1 and uri.scheme.isalpha()):
# len == 1 and alpha catches Windows drive letters like C:\ D:\
default_scheme = properties.get("DEFAULT_SCHEME", "file")
default_netloc = properties.get("DEFAULT_NETLOC", "")
return default_scheme, default_netloc, os.path.abspath(location)
Expand All @@ -406,6 +407,7 @@ def parse_location(location: str, properties: Properties = EMPTY_DICT) -> tuple[
else:
return uri.scheme, uri.netloc, f"{uri.netloc}{uri.path}"


def _initialize_fs(self, scheme: str, netloc: str | None = None) -> FileSystem:
"""Initialize FileSystem for different scheme."""
if scheme in {"oss"}:
Expand Down
Loading