[hive] branch master updated (5430dda -> 2fb4899)

2021-02-10 Thread kgyrtkirk
This is an automated email from the ASF dual-hosted git repository.

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


from 5430dda  HIVE-24625 CTAS with TBLPROPERTIES ('transactional'='false') 
loads data into incorrect directory (amagyar, rajkrrsingh)
 add 2fb4899  disable TransactionalKafkaWriterTest

No new revisions were added by this update.

Summary of changes:
 .../test/org/apache/hadoop/hive/kafka/TransactionalKafkaWriterTest.java  | 1 +
 1 file changed, 1 insertion(+)



[hive] branch master updated: HIVE-24625 CTAS with TBLPROPERTIES ('transactional'='false') loads data into incorrect directory (amagyar, rajkrrsingh)

2021-02-10 Thread ngangam
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 5430dda  HIVE-24625 CTAS with TBLPROPERTIES ('transactional'='false') 
loads data into incorrect directory (amagyar, rajkrrsingh)
5430dda is described below

commit 5430dda6f259635d12f6ffee34455c24c73a7082
Author: zeroflag 
AuthorDate: Tue Jan 12 14:05:58 2021 +0100

HIVE-24625 CTAS with TBLPROPERTIES ('transactional'='false') loads data 
into incorrect directory (amagyar, rajkrrsingh)
---
 .../metastore/TestHiveMetastoreTransformer.java| 25 +
 .../hive/ql/ddl/table/create/CreateTableDesc.java  | 11 +-
 .../ddl/table/create/like/CreateTableLikeDesc.java | 11 +-
 .../create/show/ShowCreateTableOperation.java  |  3 +-
 .../desc/formatter/TextDescTableFormatter.java |  4 +++
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java | 19 ++
 .../org/apache/hadoop/hive/ql/plan/PlanUtils.java  |  7 
 .../metastore/api/hive_metastoreConstants.java |  2 ++
 .../apache/hadoop/hive/metastore/HMSHandler.java   |  4 +++
 .../metastore/MetastoreDefaultTransformer.java | 42 --
 10 files changed, 100 insertions(+), 28 deletions(-)

diff --git 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetastoreTransformer.java
 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetastoreTransformer.java
index 4eb55e0..2d7eeed 100644
--- 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetastoreTransformer.java
+++ 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetastoreTransformer.java
@@ -48,6 +48,7 @@ import org.apache.hadoop.conf.Configuration;
 import static 
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.ACCESSTYPE_NONE;
 import static 
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.ACCESSTYPE_READONLY;
 import static 
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.ACCESSTYPE_READWRITE;
+import static 
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.TABLE_IS_CTAS;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -560,6 +561,30 @@ public class TestHiveMetastoreTransformer {
 }
   }
 
+
+  @Test
+  public void testLeavesCtasTableAlone() throws Exception {
+try {
+  resetHMSClient();
+  final String dbName = "db1";
+  String basetblName = "oldstylemgdtable";
+  Map tProps = new HashMap<>();
+  String tblName = basetblName;
+  tProps.put("DBNAME", dbName);
+  tProps.put("TBLNAME", tblName);
+  tProps.put("TBLTYPE", TableType.MANAGED_TABLE);
+  tProps.put("PROPERTIES", TABLE_IS_CTAS + "=true;transactional=false");
+  createTableWithCapabilities(tProps);
+  Table tbl2 = client.getTable(dbName, tblName);
+  assertEquals(TableType.MANAGED_TABLE.name(), tbl2.getTableType());
+} catch (Exception e) {
+  e.printStackTrace();
+  fail("testTransformerManagedTable failed with " + e.getMessage());
+} finally {
+  resetHMSClient();
+}
+  }
+
   @Test
   public void testTransformerVirtualView() throws Exception {
 try {
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/CreateTableDesc.java 
b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/CreateTableDesc.java
index affb1af..f89fcdd 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/CreateTableDesc.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/CreateTableDesc.java
@@ -18,8 +18,11 @@
 
 package org.apache.hadoop.hive.ql.ddl.table.create;
 
+import static 
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.TABLE_IS_CTAS;
+
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -488,11 +491,17 @@ public class CreateTableDesc implements DDLDesc, 
Serializable {
   /**
* @return the table properties
*/
-  @Explain(displayName = "table properties")
   public Map getTblProps() {
 return tblProps;
   }
 
+  @Explain(displayName = "table properties")
+  public Map getTblPropsExplain() { // only for displaying plan
+HashMap copy = new HashMap<>(tblProps);
+copy.remove(TABLE_IS_CTAS);
+return copy;
+  }
+
   /**
* @param tblProps
*  the table properties to set
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeDesc.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeDesc.java
index d191dc5..3e850f0 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeDesc.java
+++ 

[hive] branch master updated (dc5bb8b -> 7ec4488)

2021-02-10 Thread vihangk1
This is an automated email from the ASF dual-hosted git repository.

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


from dc5bb8b  disable tests
 add 7ec4488  HIVE-24741: get_partitions_ps_with_auth performance 
improvement (Vihang Karajgaonkar reviewed by Naveen Gangam)

No new revisions were added by this update.

Summary of changes:
 .../apache/hadoop/hive/ql/metadata/TestHive.java   | 56 ++
 .../apache/hadoop/hive/metastore/ObjectStore.java  | 40 ++--
 2 files changed, 93 insertions(+), 3 deletions(-)



[hive] branch master updated (137cb91 -> dc5bb8b)

2021-02-10 Thread kgyrtkirk
This is an automated email from the ASF dual-hosted git repository.

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


from 137cb91  HIVE-24640:Add error message in hive proto logger for failed 
queries.(Harish Jaiprakash reviewed by Anishek Agarwal)
 add dc5bb8b  disable tests

No new revisions were added by this update.

Summary of changes:
 .../apache/hadoop/hive/ql/parse/TestScheduledReplicationScenarios.java   | 1 +
 ql/src/test/queries/clientnegative/dyn_part3.q   | 1 +
 2 files changed, 2 insertions(+)