I agree that it can be helpful to return all level namespaces instead of
the current level for some use cases to avoid multiple calls from
clients. I had similar requirement
<https://github.com/apache/polaris-tools/blob/167e74f952ce4df620dac03b2e1315f44b9c2535/iceberg-catalog-migrator/api/src/main/java/org/apache/polaris/iceberg/catalog/migrator/api/CatalogMigrator.java#L201-L209>
before and had to keep custom code from the client side.

The implementation can be a bit cleaner and simplified though. Added
comments on the PR.

- Ajantha


On Wed, May 6, 2026 at 6:35 AM Yuya Ebihara <[email protected]>
wrote:

> Hi everyone,
>
> I'd like to propose adding support for recursively listing namespaces in
> the REST catalog.
>
> Trino doesn't support multi-level namespaces, so the Iceberg connector
> currently issues requests per namespace and flattens the results. This can
> become time-consuming when there are many namespaces or deeply nested
> structures.
>
> I believe this is not specific to Trino. A similar request was raised last
> year by the DuckDB community (
> https://github.com/apache/iceberg/issues/13453), although it was closed
> due to inactivity.
>
> I've opened a draft PR that introduces an optional 'recursive' parameter
> to the GET /v1/{prefix}/namespaces endpoint:
> https://github.com/apache/iceberg/pull/16199
>
> I'd appreciate any feedback or suggestions.
>
> Thanks,
> Yuya Ebihara
>

Reply via email to