kevinjqliu commented on code in PR #1453:
URL: https://github.com/apache/iceberg-python/pull/1453#discussion_r1894520472


##########
pyiceberg/io/pyarrow.py:
##########


Review Comment:
   Make doc changes as well. 
   https://py.iceberg.apache.org/configuration/#s3



##########
pyiceberg/io/pyarrow.py:
##########
@@ -352,14 +352,21 @@ def parse_location(location: str) -> Tuple[str, str, str]:
 
     def _initialize_fs(self, scheme: str, netloc: Optional[str] = None) -> 
FileSystem:
         if scheme in {"s3", "s3a", "s3n", "oss"}:
-            from pyarrow.fs import S3FileSystem
+            from pyarrow.fs import S3FileSystem, resolve_s3_region
+
+            bucket_region = None
+            if netloc:
+                try:
+                    bucket_region = resolve_s3_region(netloc)

Review Comment:
   nit:
   ```suggestion
                       region = resolve_s3_region(bucket=netloc)
   ```



##########
pyiceberg/io/pyarrow.py:
##########
@@ -352,14 +352,21 @@ def parse_location(location: str) -> Tuple[str, str, str]:
 
     def _initialize_fs(self, scheme: str, netloc: Optional[str] = None) -> 
FileSystem:
         if scheme in {"s3", "s3a", "s3n", "oss"}:
-            from pyarrow.fs import S3FileSystem
+            from pyarrow.fs import S3FileSystem, resolve_s3_region
+
+            bucket_region = None
+            if netloc:

Review Comment:
   nit: add a comment here about automatically resolving the region from a 
bucket name.
   
   



##########
tests/io/test_pyarrow.py:
##########


Review Comment:
   would be great to have an integration test as well with minio, depending on 
if minio allows setting up buckets in different regions



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to