vishnuprakaz opened a new pull request, #3383:
URL: https://github.com/apache/iceberg-python/pull/3383
Follows the REST catalog spec:
- /v1/{prefix}/namespaces:
https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml
- PageToken:
https://github.com/apache/iceberg/blob/e7a5a87f26f9de5b200254155aa037368b13a29c/open-api/rest-catalog-open-api.yaml#L2233-L2256
## Rationale for this change
`RestCatalog.list_namespaces` was making a single HTTP request and returning
only the first page of results. If the server paginates the response, PyIceberg
silently returned an incomplete namespace list.
This is the same gap that was fixed for `list_views` by @ebyhr in #3349 also
is being fixed for `list_tables` in #3348.
## Are these changes tested?
Yes, includes unit tests for paginated cases:
- `test_list_namespaces_paginated_200` — verifies all pages are fetched when
`next-page-token` is omitted on the last page
- `test_list_namespaces_paginated_200_none_next_page_token` — verifies all
pages are fetched when `next-page-token` is explicitly `null` on the last page
## Are there any user-facing changes?
- Before: returned incomplete namespace list when server paginated (only
first page)
- After: returns complete namespace list (fetches all pages)
Closes #3382
--
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]