AlgoDeveloper400 commented on code in PR #3161:
URL: https://github.com/apache/iceberg-python/pull/3161#discussion_r3146529788


##########
pyiceberg/io/pyarrow.py:
##########
@@ -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)

Review Comment:
   I think that would also work just fine. Especially if it is called in 
multiple places.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to