dimas-b opened a new issue, #4108:
URL: https://github.com/apache/polaris/issues/4108

   ### 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
   
   1. 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`
   2. Create a catalog
   3. Run Spark
   4. 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
   
   _No response_
   
   ### System information
   
   _No response_


-- 
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]

Reply via email to