mthirani2021 opened a new issue, #14263: URL: https://github.com/apache/iceberg/issues/14263
### Apache Iceberg version 1.10.0 (latest release) ### Query engine Dremio ### Please describe the bug ๐ Problem: Trying to create a Namespace (NS) with a space in Polaris Catalog via Iceberg REST Utils. Loading the Namespace Metadata from Dremio Query Engine, throws error "Namespace does not exists" <img width="383" height="44" alt="Image" src="https://github.com/user-attachments/assets/a280e47f-c173-46f2-a0de-731ba62cd4f5" /> How to Reproduce it: 1. Start the Dremio env in local 2. Spin up the Dremio Catalog server (using Polaris) for Enterprise version (with S3 or any storage provider) 3. Add the Dremio Catalog as a source 4. Try to create a folder with space. For e.g: "f 2" Stack: ``` org.apache.iceberg.exceptions.NoSuchNamespaceException: Namespace does not exist: f+2 โ โ at org.apache.iceberg.rest.ErrorHandlers$NamespaceErrorHandler.accept(ErrorHandlers.java:185) โ โ at org.apache.iceberg.rest.ErrorHandlers$NamespaceErrorHandler.accept(ErrorHandlers.java:173) โ โ at org.apache.iceberg.rest.HTTPClient.throwFailure(HTTPClient.java:240) โ โ at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:336) โ โ at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:297) โ โ at org.apache.iceberg.rest.BaseHTTPClient.get(BaseHTTPClient.java:77) โ โ at com.dremio.rest.catalog.impl.DremioCatalogRESTClientLogger.lambda$get$2(DremioCatalogRESTClientLogger.java:72) โ โ at com.dremio.rest.catalog.impl.DremioCatalogRESTClientLogger.logRestCall(DremioCatalogRESTClientLogger.java:111) โ โ at com.dremio.rest.catalog.impl.DremioCatalogRESTClientLogger.get(DremioCatalogRESTClientLogger.java:70) โ โ at org.apache.iceberg.rest.RESTClient.get(RESTClient.java:97) โ โ at org.apache.iceberg.rest.RESTClient.get(RESTClient.java:80) โ โ at com.dremio.rest.catalog.impl.DremioRESTCatalog.loadNamespaceMetadata(DremioRESTCatalog.java:825) ``` From the DremioCatalog server logs, looks like space is converted to `+`: `[06/Oct/2025:10:55:21 -0400] "GET /api/catalog/v1/default/namespaces/f+2 HTTP/1.1" 404 98` Actual encoding of the space to `+` is happened at this LOC in Iceberg library and looks like this was a pre-existing bug to me. [iceberg/core/src/main/java/org/apache/iceberg/rest/RESTUtil.java at main ยท apache/iceberg](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/rest/RESTUtil.java#L180) [iceberg/core/src/main/java/org/apache/iceberg/rest/RESTUtil.java at main ยท apache/iceberg](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/rest/RESTUtil.java#L147) FYI: Can still create NS in Polaris Catalog which has a space in it even it complains that. So I tried using REST API in plain and it worked: <img width="647" height="476" alt="Image" src="https://github.com/user-attachments/assets/bd960ba5-9b3e-4d68-b33b-ae2d0d9e4279" /> ### Willingness to contribute - [ ] I can contribute a fix for this bug independently - [x] I would be willing to contribute a fix for this bug with guidance from the Iceberg community - [x] I cannot contribute a fix for this bug at this time -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
