saihemanth-cloudera commented on code in PR #3854:
URL: https://github.com/apache/hive/pull/3854#discussion_r1049981315


##########
ql/src/test/queries/clientpositive/ctlt_translate_external.q:
##########
@@ -0,0 +1,20 @@
+set hive.fetch.task.conversion=none;
+set hive.compute.query.using.stats=false;
+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;
+set hive.default.fileformat.managed=ORC;
+
+create table test_mm(empno int, name string) partitioned by(dept string) 
stored as orc tblproperties('transactional'='true', 
'transactional_properties'='default');

Review Comment:
   You don't need to mention ('transactional'='true', 
'transactional_properties'='default') properties here. Since 
hive.create.as.acid is set to true, create table by default creates a 
transactional table.



##########
ql/src/test/results/clientpositive/llap/ctlt_translate_external.q.out:
##########
@@ -0,0 +1,108 @@
+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: create table test_external like test_mm
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test_external
+POSTHOOK: query: create table test_external like test_mm
+POSTHOOK: type: CREATETABLE
+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:            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 ####

Review Comment:
   Since the output location is masked out here, we really don't know if the 
table is pointing to managed or external location. I think it would be nice to 
have Junit test and then assert on table location. Then we can make sure no 
regressions happen in the future.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to