kevinjqliu commented on code in PR #3348:
URL: https://github.com/apache/iceberg-python/pull/3348#discussion_r3293616920
##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -1034,12 +1035,27 @@ def list_tables(self, namespace: str | Identifier) ->
list[Identifier]:
self._check_endpoint(Capability.V1_LIST_TABLES)
namespace_tuple = self._check_valid_namespace_identifier(namespace)
namespace_concat = self._encode_namespace_path(namespace_tuple)
- response = self._session.get(self.url(Endpoints.list_tables,
namespace=namespace_concat))
- try:
- response.raise_for_status()
- except HTTPError as exc:
- _handle_non_200_response(exc, {404: NoSuchNamespaceError})
- return [(*table.namespace, table.name) for table in
ListTablesResponse.model_validate_json(response.text).identifiers]
+ url = self.url(Endpoints.list_tables, namespace=namespace_concat)
+
+ tables: list[Identifier] = []
+ page_token: str | None = None
+
+ while True:
+ params = {"pageToken": page_token} if page_token else None
Review Comment:
```suggestion
params: dict[str, str] = {}
if page_token:
params["pageToken"] = page_token
```
nit
--
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]