You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/09/23 07:25:04 UTC

[GitHub] [hive] nareshpr commented on a change in pull request #1516: HIVE-24188: CTLT from MM to External or External to MM are failing with hive.strict.managed.tables & hive.create.as.acid

nareshpr commented on a change in pull request #1516:
URL: https://github.com/apache/hive/pull/1516#discussion_r493254612



##########
File path: ql/src/test/queries/clientpositive/create_like2.q
##########
@@ -7,3 +7,34 @@ ALTER TABLE table1_n20 SET TBLPROPERTIES ('a'='1', 'b'='2', 'c'='3', 'd' = '4');
 SET hive.ddl.createtablelike.properties.whitelist=a,c,D;
 CREATE TABLE table2_n14 LIKE table1_n20;
 DESC FORMATTED table2_n14;
+
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.strict.managed.tables=true;
+set hive.create.as.acid=true;
+set hive.create.as.insert.only=true;
+
+create table test_mm(empno int, name string) partitioned by(dept string) stored as orc tblproperties('transactional'='true', 'transactional_properties'='default');
+desc formatted test_mm;
+
+-- Conversion from MM to External
+create external table test_external like test_mm LOCATION '${system:test.tmp.dir}/create_like_mm_to_external';
+desc formatted test_external;
+
+-- Conversion from External to MM
+create table test_mm1 like test_external;
+desc formatted test_mm1;
+
+-- Conversion from External to External
+create external table test_external1 like test_external;
+desc formatted test_external1;
+
+-- Conversion from mm to mm
+create table test_mm2 like test_mm;
+desc formatted test_mm2;
+

Review comment:
       We are removing "EXTERNAL" from tblproperties, but not setting TableType as managed, so it fails with same exception. That is fixed in this patch @ CreateTableLikeOperation




----------------------------------------------------------------
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:
users@infra.apache.org



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