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/08/21 18:35:32 UTC

[GitHub] [iceberg] Fokko commented on a diff in pull request #5588: Python: Add logic for a custom FileIO

Fokko commented on code in PR #5588:
URL: https://github.com/apache/iceberg/pull/5588#discussion_r950884321


##########
python/pyiceberg/io/__init__.py:
##########
@@ -218,11 +234,53 @@ def delete(self, location: Union[str, InputFile, OutputFile]) -> None:
         """
 
 
-def load_file_io(_: Properties) -> FileIO:
-    # To be implemented in a different PR.
-    # - If py-file-io is present, load the right Python class
-    #   - When the property is missing, map from Java's filo-io to an appropriate FileIO
-    # - Extend the FileIO structure with a initialize that pass in properties (could also be the constructor?)
+ARROW_FILE_IO = "pyiceberg.io.pyarrow.PyArrowFileIO"
+
+# Mappings from the Java FileIO impl to a Python one. The list is ordered by preference.
+# If a implementation isn't installed, it will fall back to the next one.
+JAVA_FILE_IO_MAPPINGS: Dict[str, List[str]] = {

Review Comment:
   Thanks for the suggestion, I like it a lot!



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