Describe the bug
When an attempt to create a table clashes with a pre-existing namespace (same name as the new table) and Polaris uses NoSQL persistence, the resulting error message is not user-friendly.
To Reproduce
- Run Polaris with NoSQL persistence, e.g.
java -Dpolaris.persistence.type=nosql -Dpolaris.persistence.nosql.backend=InMemory -Dpolaris.persistence.auto-bootstrap-types=nosql -jar runtime/server/build/quarkus-app/quarkus-run.jar
- Create a catalog
- Run Spark
- In Spark:
use polaris;
create namespace ns;
create namespace ns.n2;
create table ns.n2 (n string);
[... error message here ...]
Actual Behavior
spark-sql ()> create table ns.n2 (n string);
26/04/01 17:54:38 ERROR SparkSQLDriver: Failed in [create table ns.n2 (n string)]
java.lang.IllegalArgumentException: Mismatch between persisted object type 'ns-l' (interface org.apache.polaris.persistence.nosql.coretypes.content.LocalNamespaceObj) and deserialized interface org.apache.polaris.persistence.nosql.coretypes.content.IcebergTableObj. The object ID 143836371406233600 is possibly already used by another object. If the deserialized type is a GenericObj, ensure that the artifact providing the corresponding ObjType implementation is present and is present in META-INF/services/org.apache.polaris.persistence.nosql.api.obj.ObjType
at org.apache.iceberg.rest.ErrorHandlers$DefaultErrorHandler.accept(ErrorHandlers.java:232)
at org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:124)
at org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:108)
[...]
Expected Behavior
More user-friendly error message.
Additional context
Commit 2acf472
System information
No response
Describe the bug
When an attempt to create a table clashes with a pre-existing namespace (same name as the new table) and Polaris uses NoSQL persistence, the resulting error message is not user-friendly.
To Reproduce
java -Dpolaris.persistence.type=nosql -Dpolaris.persistence.nosql.backend=InMemory -Dpolaris.persistence.auto-bootstrap-types=nosql -jar runtime/server/build/quarkus-app/quarkus-run.jarActual Behavior
Expected Behavior
More user-friendly error message.
Additional context
Commit 2acf472
System information
No response