Skip to content

REST: Add pagination support for list_namespaces#3383

Open
vishnuprakaz wants to merge 1 commit into
apache:mainfrom
vishnuprakaz:feature/rest-list-namespaces-pagination
Open

REST: Add pagination support for list_namespaces#3383
vishnuprakaz wants to merge 1 commit into
apache:mainfrom
vishnuprakaz:feature/rest-list-namespaces-pagination

Conversation

@vishnuprakaz
Copy link
Copy Markdown
Contributor

Follows the REST catalog spec:

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

@vishnuprakaz vishnuprakaz force-pushed the feature/rest-list-namespaces-pagination branch from fd37502 to ce7260d Compare May 19, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pagination support for list_namespaces

1 participant