danny0405 commented on code in PR #8478:
URL: https://github.com/apache/hudi/pull/8478#discussion_r1182143086


##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/ddl/QueryBasedDDLExecutor.java:
##########
@@ -76,22 +77,41 @@ public QueryBasedDDLExecutor(HiveSyncConfig config) {
    */
   public abstract void runSQL(String sql);
 
+  /**
+   * Create a database with the given name.
+   *
+   * @param databaseName name of database to be created.
+   */
   @Override
   public void createDatabase(String databaseName) {
-    runSQL("create database if not exists " + databaseName);
+    String createSQLQuery = 
HiveSchemaUtil.generateCreateDataBaseDDL(databaseName);
+    LOG.info("Creating database with {}.", createSQLQuery);
+    runSQL(createSQLQuery);
   }
 
+  /**
+   * Create a table with the given params.
+   *
+   * @param tableName tableName.
+   * @param storageSchema parquet Schema.
+   * @param inputFormatClass inputFormatClass.
+   * @param outputFormatClass outputFormatClass.
+   * @param serdeClass serdeClass.
+   * @param serdeProperties serdeProperties.
+   * @param tableProperties tableProperties.
+   */

Review Comment:
   Maybe just remove the patam docs if there is no much to address:
   
   ```java
     /**
      * Create a table with the given params.
      */
   ```



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to