LiebingYu commented on code in PR #1847:
URL: https://github.com/apache/fluss/pull/1847#discussion_r2516574608


##########
fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorService.java:
##########
@@ -294,13 +292,7 @@ public CompletableFuture<CreateTableResponse> 
createTable(CreateTableRequest req
                                 tableDescriptor,
                                 new 
DefaultLakeCatalogContext(currentSession().getPrincipal()));
             } catch (TableAlreadyExistException e) {
-                throw new LakeTableAlreadyExistException(
-                        String.format(
-                                "The table %s already exists in %s catalog, 
please "
-                                        + "first drop the table in %s catalog 
or use a new table name.",
-                                tablePath,
-                                lakeCatalogContainer.getDataLakeFormat(),
-                                lakeCatalogContainer.getDataLakeFormat()));
+                throw new LakeTableAlreadyExistException(e.getMessage(), e);

Review Comment:
   After we support compatibility with existing lake tables, I think the 
exception messages here should provide more details to help users quickly 
locate issues. For example, whether it is a schema mismatch or the table is not 
empty. I suggest that the specific exception information should be delegated to 
LakeCatalog.



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