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/22 05:01:48 UTC

[GitHub] [hive] nareshpr opened a new pull request #1516: HIVE-24188: CTLT from MM to External fails because table txn properties are not skipped

nareshpr opened a new pull request #1516:
URL: https://github.com/apache/hive/pull/1516


   What changes were proposed in this pull request?
   Included check to skip TXN tblproperties for external table from MMM
   
   Why are the changes needed?
   CTLT is failing from MM to External
   
   Does this PR introduce any user-facing change?
   no
   
   How was this patch tested?
   Using repro sql, included it as part of testcase.


----------------------------------------------------------------
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


[GitHub] [hive] prasanthj commented on pull request #1516: HIVE-24188: CTLT from MM to External fails because table txn properties are not skipped

Posted by GitBox <gi...@apache.org>.
prasanthj commented on pull request #1516:
URL: https://github.com/apache/hive/pull/1516#issuecomment-697030938


   lgtm. +1. cc/ @pvary for extra eyes. 


----------------------------------------------------------------
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


[GitHub] [hive] pvary commented on a change in pull request #1516: HIVE-24188: CTLT from MM to External fails because table txn properties are not skipped

Posted by GitBox <gi...@apache.org>.
pvary commented on a change in pull request #1516:
URL: https://github.com/apache/hive/pull/1516#discussion_r493206327



##########
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:
       The pull request title says that we have a problem with converting from mm to external tables. The tests convert from external tables to mm. Maybe fix the jira description?  Or add more tests?




----------------------------------------------------------------
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


[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

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



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


[GitHub] [hive] pvary commented on a change in pull request #1516: HIVE-24188: CTLT from MM to External fails because table txn properties are not skipped

Posted by GitBox <gi...@apache.org>.
pvary commented on a change in pull request #1516:
URL: https://github.com/apache/hive/pull/1516#discussion_r493205183



##########
File path: ql/src/test/results/clientpositive/llap/create_like2.q.out
##########
@@ -59,3 +59,285 @@ Bucket Columns:     	[]
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
+PREHOOK: query: create table test_mm(empno int, name string) partitioned by(dept string) stored as orc tblproperties('transactional'='true', 'transactional_properties'='default')
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test_mm
+POSTHOOK: query: create table test_mm(empno int, name string) partitioned by(dept string) stored as orc tblproperties('transactional'='true', 'transactional_properties'='default')
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test_mm
+PREHOOK: query: desc formatted test_mm
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@test_mm
+POSTHOOK: query: desc formatted test_mm
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@test_mm
+# col_name            	data_type           	comment             
+empno               	int                 	                    
+name                	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+dept                	string              	                    
+	 	 
+# Detailed Table Information	 	 
+Database:           	default             	 
+#### A masked pattern was here ####
+Retention:          	0                   	 
+#### A masked pattern was here ####
+Table Type:         	MANAGED_TABLE       	 
+Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
+	numFiles            	0                   
+	numPartitions       	0                   
+	numRows             	0                   
+	rawDataSize         	0                   
+	totalSize           	0                   
+	transactional       	true                
+	transactional_properties	default             
+#### A masked pattern was here ####
+	 	 
+# Storage Information	 	 
+SerDe Library:      	org.apache.hadoop.hive.ql.io.orc.OrcSerde	 
+InputFormat:        	org.apache.hadoop.hive.ql.io.orc.OrcInputFormat	 
+OutputFormat:       	org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat	 
+Compressed:         	No                  	 
+Num Buckets:        	-1                  	 
+Bucket Columns:     	[]                  	 
+Sort Columns:       	[]                  	 
+#### A masked pattern was here ####
+PREHOOK: type: CREATETABLE
+#### A masked pattern was here ####
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test_external
+#### A masked pattern was here ####
+POSTHOOK: type: CREATETABLE
+#### A masked pattern was here ####
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test_external
+PREHOOK: query: desc formatted test_external
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@test_external
+POSTHOOK: query: desc formatted test_external
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@test_external
+# col_name            	data_type           	comment             
+empno               	int                 	                    
+name                	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+dept                	string              	                    
+	 	 
+# Detailed Table Information	 	 
+Database:           	default             	 
+#### A masked pattern was here ####
+Retention:          	0                   	 
+#### A masked pattern was here ####
+Table Type:         	EXTERNAL_TABLE      	 
+Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
+	discover.partitions 	true                
+	numFiles            	0                   
+	numPartitions       	0                   
+	numRows             	0                   
+	rawDataSize         	0                   
+	totalSize           	0                   
+#### A masked pattern was here ####
+	 	 
+# Storage Information	 	 
+SerDe Library:      	org.apache.hadoop.hive.ql.io.orc.OrcSerde	 
+InputFormat:        	org.apache.hadoop.hive.ql.io.orc.OrcInputFormat	 
+OutputFormat:       	org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat	 
+Compressed:         	No                  	 
+Num Buckets:        	-1                  	 
+Bucket Columns:     	[]                  	 
+Sort Columns:       	[]                  	 
+PREHOOK: query: create table test_mm1 like test_external
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test_mm1
+POSTHOOK: query: create table test_mm1 like test_external
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test_mm1
+PREHOOK: query: desc formatted test_mm1
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@test_mm1
+POSTHOOK: query: desc formatted test_mm1
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@test_mm1
+# col_name            	data_type           	comment             
+empno               	int                 	                    
+name                	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+dept                	string              	                    
+	 	 
+# Detailed Table Information	 	 
+Database:           	default             	 
+#### A masked pattern was here ####
+Retention:          	0                   	 
+#### A masked pattern was here ####
+Table Type:         	MANAGED_TABLE       	 
+Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
+	numFiles            	0                   
+	numPartitions       	0                   
+	numRows             	0                   
+	rawDataSize         	0                   
+	totalSize           	0                   
+	transactional       	true                
+	transactional_properties	insert_only         

Review comment:
       This is a bit counterintuitive to me. Why is this table property set to insert only whereas in the other case it is default? 




----------------------------------------------------------------
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


[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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [hive] prasanthj merged 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

Posted by GitBox <gi...@apache.org>.
prasanthj merged pull request #1516:
URL: https://github.com/apache/hive/pull/1516


   


----------------------------------------------------------------
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


[GitHub] [hive] nareshpr commented on a change in pull request #1516: HIVE-24188: CTLT from MM to External fails because table txn properties are not skipped

Posted by GitBox <gi...@apache.org>.
nareshpr commented on a change in pull request #1516:
URL: https://github.com/apache/hive/pull/1516#discussion_r493243960



##########
File path: ql/src/test/results/clientpositive/llap/create_like2.q.out
##########
@@ -59,3 +59,285 @@ Bucket Columns:     	[]
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
+PREHOOK: query: create table test_mm(empno int, name string) partitioned by(dept string) stored as orc tblproperties('transactional'='true', 'transactional_properties'='default')
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test_mm
+POSTHOOK: query: create table test_mm(empno int, name string) partitioned by(dept string) stored as orc tblproperties('transactional'='true', 'transactional_properties'='default')
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test_mm
+PREHOOK: query: desc formatted test_mm
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@test_mm
+POSTHOOK: query: desc formatted test_mm
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@test_mm
+# col_name            	data_type           	comment             
+empno               	int                 	                    
+name                	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+dept                	string              	                    
+	 	 
+# Detailed Table Information	 	 
+Database:           	default             	 
+#### A masked pattern was here ####
+Retention:          	0                   	 
+#### A masked pattern was here ####
+Table Type:         	MANAGED_TABLE       	 
+Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
+	numFiles            	0                   
+	numPartitions       	0                   
+	numRows             	0                   
+	rawDataSize         	0                   
+	totalSize           	0                   
+	transactional       	true                
+	transactional_properties	default             
+#### A masked pattern was here ####
+	 	 
+# Storage Information	 	 
+SerDe Library:      	org.apache.hadoop.hive.ql.io.orc.OrcSerde	 
+InputFormat:        	org.apache.hadoop.hive.ql.io.orc.OrcInputFormat	 
+OutputFormat:       	org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat	 
+Compressed:         	No                  	 
+Num Buckets:        	-1                  	 
+Bucket Columns:     	[]                  	 
+Sort Columns:       	[]                  	 
+#### A masked pattern was here ####
+PREHOOK: type: CREATETABLE
+#### A masked pattern was here ####
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test_external
+#### A masked pattern was here ####
+POSTHOOK: type: CREATETABLE
+#### A masked pattern was here ####
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test_external
+PREHOOK: query: desc formatted test_external
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@test_external
+POSTHOOK: query: desc formatted test_external
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@test_external
+# col_name            	data_type           	comment             
+empno               	int                 	                    
+name                	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+dept                	string              	                    
+	 	 
+# Detailed Table Information	 	 
+Database:           	default             	 
+#### A masked pattern was here ####
+Retention:          	0                   	 
+#### A masked pattern was here ####
+Table Type:         	EXTERNAL_TABLE      	 
+Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
+	discover.partitions 	true                
+	numFiles            	0                   
+	numPartitions       	0                   
+	numRows             	0                   
+	rawDataSize         	0                   
+	totalSize           	0                   
+#### A masked pattern was here ####
+	 	 
+# Storage Information	 	 
+SerDe Library:      	org.apache.hadoop.hive.ql.io.orc.OrcSerde	 
+InputFormat:        	org.apache.hadoop.hive.ql.io.orc.OrcInputFormat	 
+OutputFormat:       	org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat	 
+Compressed:         	No                  	 
+Num Buckets:        	-1                  	 
+Bucket Columns:     	[]                  	 
+Sort Columns:       	[]                  	 
+PREHOOK: query: create table test_mm1 like test_external
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test_mm1
+POSTHOOK: query: create table test_mm1 like test_external
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test_mm1
+PREHOOK: query: desc formatted test_mm1
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@test_mm1
+POSTHOOK: query: desc formatted test_mm1
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@test_mm1
+# col_name            	data_type           	comment             
+empno               	int                 	                    
+name                	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+dept                	string              	                    
+	 	 
+# Detailed Table Information	 	 
+Database:           	default             	 
+#### A masked pattern was here ####
+Retention:          	0                   	 
+#### A masked pattern was here ####
+Table Type:         	MANAGED_TABLE       	 
+Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
+	numFiles            	0                   
+	numPartitions       	0                   
+	numRows             	0                   
+	rawDataSize         	0                   
+	totalSize           	0                   
+	transactional       	true                
+	transactional_properties	insert_only         

Review comment:
       In SemanticAnalyzer, if there is no UserSpecifiedFormat in CTLT, while adding all default properties we are using TextFile Input/Output classes because default hive.default.fileformat.managed is TextFile. But org.apache.hadoop.hive.ql.ddl.table.create.like.CreateTableLikeOperation#createTableLikeTable is validating whether any UserSpecifiedFormat, if not its using same table object which is set as ORC. I will change my testcase to set hive.default.fileformat.managed=ORC which should convert it to default & will try to fix that issue in another jira.




----------------------------------------------------------------
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


[GitHub] [hive] pvary 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

Posted by GitBox <gi...@apache.org>.
pvary commented on a change in pull request #1516:
URL: https://github.com/apache/hive/pull/1516#discussion_r493252063



##########
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:
       Last question: What happens when we run:
   ```
   create external table test_external2 like test_mm;
   ```
   
   Thanks,
   Peter




----------------------------------------------------------------
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


[GitHub] [hive] nareshpr commented on a change in pull request #1516: HIVE-24188: CTLT from MM to External fails because table txn properties are not skipped

Posted by GitBox <gi...@apache.org>.
nareshpr commented on a change in pull request #1516:
URL: https://github.com/apache/hive/pull/1516#discussion_r493244467



##########
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:
       I will change the title, both MM to External & External to MM are failing.




----------------------------------------------------------------
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


[GitHub] [hive] prasanthj commented on pull request #1516: HIVE-24188: CTLT from MM to External fails because table txn properties are not skipped

Posted by GitBox <gi...@apache.org>.
prasanthj commented on pull request #1516:
URL: https://github.com/apache/hive/pull/1516#issuecomment-697030938


   lgtm. +1. cc/ @pvary for extra eyes. 


----------------------------------------------------------------
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