Skip to content

[RestCatalog] Support Page Sizes #2934

Description

@DerGut

Is your feature request related to a problem or challenge?

By the REST spec, a REST catalog may return the rest-page-size property in a /v1/config response. The catalog client is then supposed to use it and provide it along with list requests via the ?pageSize query parameter.

Today, the Rust RestCatalog client doesn't look at the rest-page-size property and never sends a pageSize query parameter. It therefore depends on the catalog server to implement an implicit default page size.

Describe the solution you'd like

The spec already prescribes this fairly precisely.

We'd use a precedence order similar to other properties:

  1. catalog default from /v1/config: {"defaults": {"rest-page-size": "1000"}} (if provided)
  2. overridden by client side config: with_page_size(1000) (else None or some client-side default1)
  3. overridden by catalog overrides from v1/config: {"overrides": {"rest-page-size": "1000"}} (if provided)

Willingness to contribute

I can contribute to this feature independently

Footnotes

  1. IIUC only iceberg-go currently sets a client-side default (20). Java and Python don't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions