JonasJ-ap commented on code in PR #6906:
URL: https://github.com/apache/iceberg/pull/6906#discussion_r1144249503
##########
python/pyiceberg/io/pyarrow.py:
##########
@@ -278,6 +279,15 @@ def _get_fs(self, scheme: str) -> FileSystem:
"region": self.properties.get(S3_REGION),
}
return S3FileSystem(**client_kwargs)
+ elif scheme in {"gs", "gcs"}:
+ if access_token := self.properties.get("gs.access-token"):
+ client_kwargs = {
+ "access_token": access_token,
+ "credential_token_expiration":
self.properties.get("gs.credential-token-expiration"),
+ }
+ return GcsFileSystem(**client_kwargs)
+ else:
+ return GcsFileSystem()
Review Comment:
[Question] Is it possible to take out this `if...else...`, like:
```python
elif scheme in {"gs", "gcs"}:
client_kwargs = {
"access_token": self.properties.get("gs.access-token"),
"credential_token_expiration":
self.properties.get("gs.credential-token-expiration"),
}
return GcsFileSystem(**client_kwargs)
```
?
Is there any problem if `access_token` is not given but
`credential_token_expiration` is provided? Thank you in advance for your answer.
--
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]