You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/11/03 23:37:08 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #6010: Python: Fix PyArrowFileIO caching

rdblue commented on code in PR #6010:
URL: https://github.com/apache/iceberg/pull/6010#discussion_r1013488063


##########
python/pyiceberg/io/pyarrow.py:
##########
@@ -223,8 +236,8 @@ def new_input(self, location: str) -> PyArrowFile:
         Returns:
             PyArrowFile: A PyArrowFile instance for the given location
         """
-        fs, path = self.get_fs_and_path(location)
-        return PyArrowFile(fs=fs, location=location, path=path)
+        fs = self.get_fs(self.extract_scheme(location))
+        return PyArrowFile(fs=fs, location=location)

Review Comment:
   I don't understand why this parses the URI here and in `PyArrowFile`. I think this should just leave PyArrowFile the way that it was and pass in the path after parsing it here:
   
   ```python
       scheme, path = parse_location(location)
       fs = self.get_fs(scheme)
       return PyArrowFile(fs=fs, location=location, path=path)
   ```



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org