You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Still reproducible on main at 58d5c7b (Iceberg is 1.11.0 now, and RESTUtil still joins levels with %1F). The mechanism is a little different from what the description says, though, so I wanted to record what I measured -- the separator is not chosen by IcebergRestCatalogService.
Every client request goes through URLTranscoderVerticle, which listens on the port clients use and forwards to Armeria on port + 1. It rewrites the path with path.replace("%1F", "."), and query parameters by replacing the unit separator U+001F with ., before forwarding. So by the time any Iceberg endpoint sees the namespace, default%1Fnested and the literal default.nested are the same string:
# through the transcoder (port 8080)
GET /api/2.1/unity-catalog/iceberg/v1/catalogs/unity/namespaces/default%1Fnested
400 {"error":{"message":"Invalid schema full name: unity.default.nested","type":"BaseException","code":400}}
GET /api/2.1/unity-catalog/iceberg/v1/catalogs/unity/namespaces/default.nested
400 {"error":{"message":"Invalid schema full name: unity.default.nested","type":"BaseException","code":400}}
GET /api/2.1/unity-catalog/iceberg/v1/catalogs/unity/namespaces/default%1Fnested/tables
404 {"error":{"message":"Schema not found: unity.default.nested","type":"NoSuchNamespaceException","code":404}}
The rewrite is not gratuitous: Armeria rejects a control character in a path outright, which is what the transcoder exists to work around. Asking it directly shows that:
# straight to Armeria (port 8081), no transcoder
GET /api/2.1/unity-catalog/iceberg/v1/catalogs/unity/namespaces/default%1Fnested
400 Status: 400
Description: Invalid request path
So the request never carries a level separator Unity Catalog could act on: it arrives as a single dotted name, which then fails either name validation (loadNamespace, 400) or the schema lookup (listTables, 404) depending on the endpoint. A fix therefore cannot just swap the separator in the service -- it has to get the levels past Armeria's path restriction first, for instance by having the transcoder encode them into something the service can split on, or by having the endpoints take the namespace from somewhere other than the path segment.
Two side notes: the two endpoints disagreeing on the status for the same namespace is a symptom of the same thing, and the "type": "BaseException" in the first response is a separate issue (#1796, PR #1797) -- fixing that will make this one report BadRequestException, but it stays a 400.
Activity
dennyglee commentedon Jul 12, 2024
Thanks @szlta - we will review this shortly!
alexreid-db commentedon Aug 2, 2024
Hi I will be looking at making some changes to address this
handle catalog and namespace properly in Iceberg REST api (#324)
handle catalog and namespace properly in Iceberg REST api (unitycatal…
handle catalog and namespace properly in Iceberg REST api (unitycatal…
[0.2] handle catalog and namespace properly in Iceberg REST api (#324) (
moomindani commentedon Sep 5, 2026
Still reproducible on
mainat58d5c7b(Iceberg is 1.11.0 now, andRESTUtilstill joins levels with%1F). The mechanism is a little different from what the description says, though, so I wanted to record what I measured -- the separator is not chosen byIcebergRestCatalogService.Every client request goes through
URLTranscoderVerticle, which listens on the port clients use and forwards to Armeria onport + 1. It rewrites the path withpath.replace("%1F", "."), and query parameters by replacing the unit separator U+001F with., before forwarding. So by the time any Iceberg endpoint sees the namespace,default%1Fnestedand the literaldefault.nestedare the same string:The rewrite is not gratuitous: Armeria rejects a control character in a path outright, which is what the transcoder exists to work around. Asking it directly shows that:
So the request never carries a level separator Unity Catalog could act on: it arrives as a single dotted name, which then fails either name validation (
loadNamespace, 400) or the schema lookup (listTables, 404) depending on the endpoint. A fix therefore cannot just swap the separator in the service -- it has to get the levels past Armeria's path restriction first, for instance by having the transcoder encode them into something the service can split on, or by having the endpoints take the namespace from somewhere other than the path segment.Two side notes: the two endpoints disagreeing on the status for the same namespace is a symptom of the same thing, and the
"type": "BaseException"in the first response is a separate issue (#1796, PR #1797) -- fixing that will make this one reportBadRequestException, but it stays a 400.[Server] Answer three Iceberg REST details the way the spec describes…