[ 
https://issues.apache.org/jira/browse/HUDI-2057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17372851#comment-17372851
 ] 

ASF GitHub Bot commented on HUDI-2057:
--------------------------------------

leesf commented on a change in pull request #3146:
URL: https://github.com/apache/hudi/pull/3146#discussion_r662372869



##########
File path: 
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/util/HiveSchemaUtil.java
##########
@@ -413,7 +413,12 @@ public static String generateCreateDDL(String tableName, 
MessageType storageSche
     }
 
     String partitionsStr = String.join(",", partitionFields);
-    StringBuilder sb = new StringBuilder("CREATE EXTERNAL TABLE  IF NOT EXISTS 
");
+    StringBuilder sb = new StringBuilder();
+    if (config.createManagedTable) {
+      sb.append("CREATE TABLE  IF NOT EXISTS ");

Review comment:
       `CREATE TABLE IF NOT EXISTS `




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


> CTAS Generate An External Table When Create Managed Table
> ---------------------------------------------------------
>
>                 Key: HUDI-2057
>                 URL: https://issues.apache.org/jira/browse/HUDI-2057
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: Spark Integration
>            Reporter: pengzhiwei
>            Assignee: pengzhiwei
>            Priority: Major
>              Labels: pull-request-available
>
> Currently CTAS would generate an external table when create a managed table 
> in the hive meta store.
> {code:java}
> create table h0 using hudi as select 1 as id, 'a1' as name;{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to