[ https://issues.apache.org/jira/browse/HIVE-24188?focusedWorklogId=489441&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-489441 ]
ASF GitHub Bot logged work on HIVE-24188: ----------------------------------------- Author: ASF GitHub Bot Created on: 23/Sep/20 07:26 Start Date: 23/Sep/20 07:26 Worklog Time Spent: 10m Work Description: 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 Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:default.test_external2 cannot be declared transactional because it's an external table) (state=08S01,code=1) ---------------------------------------------------------------- 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 Issue Time Tracking ------------------- Worklog Id: (was: 489441) Time Spent: 1h 50m (was: 1h 40m) > CTLT from MM to External or External to MM are failing with > hive.strict.managed.tables & hive.create.as.acid > ------------------------------------------------------------------------------------------------------------ > > Key: HIVE-24188 > URL: https://issues.apache.org/jira/browse/HIVE-24188 > Project: Hive > Issue Type: Bug > Reporter: Naresh P R > Assignee: Naresh P R > Priority: Major > Labels: pull-request-available > Time Spent: 1h 50m > Remaining Estimate: 0h > > Repro steps > > {code:java} > set hive.support.concurrency=true; > set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; > create table test_mm(age int, name string) partitioned by(dept string) stored > as orc tblproperties('transactional'='true', > 'transactional_properties'='default'); > create external table test_external like test_mm LOCATION > '${system:test.tmp.dir}/create_like_mm_to_external'; > {code} > Fails with below exception > {code:java} > Error: Error while processing statement: FAILED: Execution Error, return code > 1 from org.apache.hadoop.hive.ql.exec.DDLTask. > MetaException(message:default.test_external cannot be declared transactional > because it's an external table) (state=08S01,code=1){code} -- This message was sent by Atlassian Jira (v8.3.4#803005)