nrg4878 commented on a change in pull request #1578:
URL: https://github.com/apache/hive/pull/1578#discussion_r505724698



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -13194,16 +13194,16 @@ private void updateDefaultTblProps(Map<String, 
String> source, Map<String, Strin
       }
     }
 
-    boolean makeInsertOnly = !isTemporaryTable && (isManaged && 
HiveConf.getBoolVar(
-        conf, ConfVars.HIVE_CREATE_TABLES_AS_INSERT_ONLY));
-    boolean makeAcid = !isTemporaryTable && !makeInsertOnly && makeAcid();
+    boolean makeInsertOnly = !isTemporaryTable && HiveConf.getBoolVar(
+        conf, ConfVars.HIVE_CREATE_TABLES_AS_INSERT_ONLY);
+    boolean makeAcid = !isTemporaryTable && makeAcid();
     // if not specify managed table and create.table.as.external is true
     // ignore makeInsertOnly and makeAcid.
     if (!isManaged && HiveConf.getBoolVar(conf, 
ConfVars.CREATE_TABLE_AS_EXTERNAL)) {
       makeInsertOnly = false;
       makeAcid = false;
     }
-    if ((makeInsertOnly || makeAcid || isTransactional)
+    if ((makeInsertOnly || makeAcid || isTransactional || isManaged)
         && !isExt  && !isMaterialization && 
StringUtils.isBlank(storageFormat.getStorageHandler())

Review comment:
       multiple ways to create acid table
   create transactional table
   create managed table
   create table with hive.create.as.acid=true or 
hive.create.as.insert.only=true.
   
   so the above logic ensures that table is ACID table when managed keyword if 
used.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to