This is an automated email from the ASF dual-hosted git repository.

ngangam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 8dfae92  HIVE-24271: Managed keyword in create table should always 
create ACID table (Naveen Gangam reviewed by Yongzhi Chen)
8dfae92 is described below

commit 8dfae9289996c1f4a2ed940eccac6c78faccbf14
Author: Naveen Gangam <[email protected]>
AuthorDate: Wed Oct 14 01:44:59 2020 -0400

    HIVE-24271: Managed keyword in create table should always create ACID table 
(Naveen Gangam reviewed by Yongzhi Chen)
---
 ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index d0026a7..a6f952d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -13203,7 +13203,7 @@ public class SemanticAnalyzer extends 
BaseSemanticAnalyzer {
       makeInsertOnly = false;
       makeAcid = false;
     }
-    if ((makeInsertOnly || makeAcid || isTransactional)
+    if ((makeInsertOnly || makeAcid || isTransactional || isManaged)
         && !isExt  && !isMaterialization && 
StringUtils.isBlank(storageFormat.getStorageHandler())
         //don't overwrite user choice if transactional attribute is explicitly 
set
         && 
!retValue.containsKey(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL)) {
@@ -13212,7 +13212,7 @@ public class SemanticAnalyzer extends 
BaseSemanticAnalyzer {
         retValue.put(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES,
             TransactionalValidationListener.INSERTONLY_TRANSACTIONAL_PROPERTY);
       }
-      if (makeAcid || isTransactional) {
+      if (makeAcid || isTransactional || (isManaged && !makeInsertOnly)) {
         retValue = convertToAcidByDefault(storageFormat, qualifiedTableName, 
sortCols, retValue);
       }
     }

Reply via email to