diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java index dda28b0..dbc6d8f 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java @@ -12183,6 +12183,9 @@ public static boolean isAcidTable(Table tab) { if (!SessionState.get().getTxnMgr().supportsAcid()) return false; String tableIsTransactional = tab.getProperty(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL); + if(tableIsTransactional == null) { + tableIsTransactional = tab.getProperty(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL.toUpperCase()); + } return tableIsTransactional != null && tableIsTransactional.equalsIgnoreCase("true"); } diff --git ql/src/test/queries/clientpositive/update_all_types.q ql/src/test/queries/clientpositive/update_all_types.q index 262a304..0229845 100644 --- ql/src/test/queries/clientpositive/update_all_types.q +++ ql/src/test/queries/clientpositive/update_all_types.q @@ -17,7 +17,7 @@ create table acid_uat(ti tinyint, s string, vc varchar(128), ch char(36), - b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); + b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('TRANSACTIONAL'='TRUE'); insert into table acid_uat select ctinyint, diff --git ql/src/test/results/clientpositive/tez/update_all_types.q.out ql/src/test/results/clientpositive/tez/update_all_types.q.out index ca098fb..1cfa088 100644 --- ql/src/test/results/clientpositive/tez/update_all_types.q.out +++ ql/src/test/results/clientpositive/tez/update_all_types.q.out @@ -13,7 +13,7 @@ create table acid_uat(ti tinyint, s string, vc varchar(128), ch char(36), - b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') + b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('TRANSACTIONAL'='TRUE') PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@acid_uat @@ -32,7 +32,7 @@ create table acid_uat(ti tinyint, s string, vc varchar(128), ch char(36), - b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') + b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('TRANSACTIONAL'='TRUE') POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@acid_uat diff --git ql/src/test/results/clientpositive/update_all_types.q.out ql/src/test/results/clientpositive/update_all_types.q.out index ca098fb..1cfa088 100644 --- ql/src/test/results/clientpositive/update_all_types.q.out +++ ql/src/test/results/clientpositive/update_all_types.q.out @@ -13,7 +13,7 @@ create table acid_uat(ti tinyint, s string, vc varchar(128), ch char(36), - b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') + b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('TRANSACTIONAL'='TRUE') PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@acid_uat @@ -32,7 +32,7 @@ create table acid_uat(ti tinyint, s string, vc varchar(128), ch char(36), - b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') + b boolean) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('TRANSACTIONAL'='TRUE') POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@acid_uat