ianton-ru opened a new issue, #2462:
URL: https://github.com/apache/iceberg-python/issues/2462

   ### Apache Iceberg version
   
   0.9.1 (latest release)
   
   ### Please describe the bug šŸž
   
   I tried to create a table with a slash character in its name, using Spark 
Iceberg as the catalog.
   
   This code fails:
   ```
   catalog = load_catalog(
       "rest",
       **{
           "type": "rest",
   .........
       }
   )
   
   table =  catalog.create_table(
       identifier="foo/bar",
       ....
   )
   
   table.append(data)
   ```
   
   with the following error:
   
   ```
   requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: 
http://localhost:8182/v1/namespaces/iceberg/tables/foo/bar
   ```
   
   This also fails:
   
   ```
   table =  catalog.create_table(
       identifier="foo%2Fbar",
       ....
   )
   
   table.append(data)
   ```
   
   with a different error:
   
   ```
   requests.exceptions.HTTPError: 404 Client Error: Not Found for url: 
http://localhost:8182/v1/namespaces/iceberg/tables/foo%2Fbar
   ```
   
   But if create using the non-encoded version, but load using the encoded one:
   
   ```
   catalog.create_table(
       identifier="foo/bar",
       ....
   )
   
   table = catalog.load_table("foo%2Fbar")
   
   table.append(data)
   ```
   
   This works.
   
   I don't think that this is correct behavior.
   
   I would expect one of the following instead:
   1. Always use encoded name `foo%2Fbar`.
   2. Always use non-encoded name `foo/bar`.
   3. Restrict the use of "dangerous" characters in table names, including the 
slash.
   
   I’m not sure which option is best, but the current behavior seems worse than 
any of them.
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] 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]

Reply via email to