yongzhi commented on a change in pull request #1578: URL: https://github.com/apache/hive/pull/1578#discussion_r505587450
########## File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java ########## @@ -13212,7 +13212,7 @@ private void updateDefaultTblProps(Map<String, String> source, Map<String, Strin retValue.put(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES, TransactionalValidationListener.INSERTONLY_TRANSACTIONAL_PROPERTY); } - if (makeAcid || isTransactional) { + if (makeAcid || isTransactional || (isManaged && !makeInsertOnly)) { Review comment: Do we have the case it is isTransaction = true, isManaged = true and makeInsertOnly is false (happen not to set TABLE_TRANSACTIONAL_PROPERTIES.) ? ########## 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: I do not understand the logic here: Why isManaged and without explicitly saying it is a transactional table, it is an insert-only one? ---------------------------------------------------------------- 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