JingsongLi commented on code in PR #2595:
URL: https://github.com/apache/incubator-paimon/pull/2595#discussion_r1437973070


##########
paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java:
##########
@@ -221,13 +218,16 @@ protected boolean databaseExistsImpl(String databaseName) 
{
     @Override
     protected void createDatabaseImpl(String name) {
         try {
-            Path databasePath = newDatabasePath(name);
-            locationHelper.createPathIfRequired(databasePath, fileIO);
-
-            Database database = new Database();
-            database.setName(name);
-            locationHelper.specifyDatabaseLocation(databasePath, database);
-            client.createDatabase(database);
+            Database database = getDatabase(name);
+            if (database == null) {

Review Comment:
   If database not null, here should throw `DatabaseAlreadyExistException`?
   We can add test in `CatalogTestBase`.



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