Skip to content

fix(rest): use the Iceberg pagination query parameter - #1213

Draft
WZhuo wants to merge 1 commit into
apache:mainfrom
WZhuo:fix/rest-catalog-pagination
Draft

WZhuo wants to merge 1 commit into
apache:mainfrom
WZhuo:fix/rest-catalog-pagination

Conversation

@WZhuo

@WZhuo WZhuo commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

The REST catalog client omits the pagination parameter on the first namespace or table listing request and sends page_token on continuation requests. A conforming server returns all results at once when the parameter is absent; a server that returns a continuation token may ignore the misspelled parameter and keep returning the first page.

Use pageToken= to request the first page and pass each next-page-token back as pageToken, as specified in the Iceberg REST Catalog OpenAPI spec. Reject repeated tokens so a malformed response cannot trap the client in a pagination loop.

Related to #273 (REST Catalog specification tracking).

Verification

  • pre-commit run --all-files passed.
  • Built iceberg_rest_static and rest_catalog_test locally on macOS. All three new pagination regression tests passed.
  • The full rest_catalog_test suite reported 574 passed, 1 skipped, and 3 OAuth2 failures. The same three failures reproduced on the unmodified base (e8591ae): TableSessionCacheKeyTest.ExchangedSessionsAreKeyedByActor, TableSessionCacheKeyTest.SessionsAreKeyedByFlowAndTokenType, and RestCatalogOAuth2UriTest.TrustsServerOverridesWhenExplicitlyEnabled.
  • No live REST catalog integration tests were run.

AI assistance

OpenAI Codex helped verify the specification, implement the fix, write the regression tests, and draft this description. This PR is a draft for contributor review.

This branch has not been deployed

No deployments
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.

1 participant