vox-vox-vox opened a new issue, #13115:
URL: https://github.com/apache/iceberg/issues/13115
### Apache Iceberg version
1.9.0 (latest release)
### Query engine
Spark
### Please describe the bug 🐞
# Description
When using the Spark engine with the REST Catalog, attempting to load a
table that has a reserved name (e.g., metadata, snapshots, etc.) before
creating it triggers an unexpected error. This behavior check for table
existence before creation.
# Steps to Reproduce
just past this code in org.apache.iceberg.rest.TestRESTCatalog
```java
@Test
public void reproduceError(){
RESTCatalog catalog = catalog();
catalog.createNamespace(Namespace.of("newdb"));
TableIdentifier identifier = TableIdentifier.of("newdb", "snapshots");
if(catalog.tableExists(identifier)){
catalog.buildTable(identifier, SCHEMA).create();
}
catalog.loadTable(identifier);
}
```
# Expected Behavior
Loading a non-existent table should return false if the table does not exist.
Creating a table with a reserved name should success
# Actual Behavior
throw errors in `TableIdentifier identifier = TableIdentifier.of("newdb",
"snapshots");`
### Willingness to contribute
- [x] 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
- [ ] 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]