Skip to content

Add pagination support for list_namespaces #3382

@vishnuprakaz

Description

@vishnuprakaz

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions