ITADN

Add pagination support for list_namespaces

#3382Openvishnuprakaz 创建于 2026-05-19
V
vishnuprakazcommented
### Feature Request / Improvement The REST catalog spec defines `pageToken` as a query parameter for `GET /v1/{prefix}/namespaces`, and `next-page-token` in the `ListNamespacesResponse` schema: - https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml Currently, `RestCatalog.list_namespaces` makes a single HTTP request and returns only the first page of results. If the server paginates the response, PyIceberg silently returns an incomplete namespace list. This is the same gap that was fixed for `list_views` by @ebyhr in #3349 and is being fixed for `list_tables` in #3348. The fix is to: 1. Add `next_page_token` field to `ListNamespaceResponse` 2. Loop through pages in `list_namespaces` using the same pattern as `list_views`
2 条评论