[ https://issues.apache.org/jira/browse/HIVE-22342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16958487#comment-16958487 ]
Vineet Garg commented on HIVE-22342: ------------------------------------ [~ngangam] I believe this has broken the CREATE TABLE. Even simple CREATE TABLE is creating EXTERNAL TABLE instead of default MANAGED type. {code:sql} hive> create table testext(i int, j int); hive> desc formatted testext; # col_name data_type comment i int j int # Detailed Table Information Database: default OwnerType: USER Owner: vgarg CreateTime: Wed Oct 23 20:03:13 PDT 2019 LastAccessTime: UNKNOWN Retention: 0 Location: file:/Users/vgarg/hive_temp/vgarg/hive/warehouse/testext Table Type: EXTERNAL_TABLE Table Parameters: COLUMN_STATS_ACCURATE {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"i\":\"true\",\"j\":\"true\"}} EXTERNAL TRUE TRANSLATED_TO_EXTERNAL TRUE bucketing_version 2 external.table.purge TRUE numFiles 0 numRows 0 rawDataSize 0 totalSize 0 transient_lastDdlTime 1571886193 # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: -1 Bucket Columns: [] Sort Columns: [] Storage Desc Params: serialization.format 1 {code} {code} 2019-10-23T20:03:13,662 INFO [caf84128-72fe-4e57-81cd-cbd3860c56d0 main] metastore.MetastoreDefaultTransformer: Converting testext to EXTERNAL tableType for Hiveserver2#4.0.0-SNAPSHOT@10.0.1.11 2019-10-23T20:03:13,662 INFO [caf84128-72fe-4e57-81cd-cbd3860c56d0 main] metastore.MetastoreDefaultTransformer: Modified table params are:{external.table.purge=TRUE, totalSize=0, numRows=0, rawDataSize=0, EXTERNAL=TRUE, COLUMN_STATS_ACCURATE={"BASIC_STATS":"true","COLUMN_STATS":{"i":"true","j":"true"}}, numFiles=0, TRANSLATED_TO_EXTERNAL=TRUE, bucketing_version=2, numFilesErasureCoded=0} 2019-10-23T20:03:13,662 INFO [caf84128-72fe-4e57-81cd-cbd3860c56d0 main] metastore.MetastoreDefaultTransformer: Transformer returning table:Table(tableName:testext, dbName:default, owner:vgarg, createTime:1571886193, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:i, type:int, comment:null), FieldSchema(name:j, type:int, comment:null)], location:file:/Users/vgarg/hive_temp/vgarg/hive/warehouse/testext, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), storedAsSubDirectories:false), partitionKeys:[], parameters:{external.table.purge=TRUE, totalSize=0, numRows=0, rawDataSize=0, EXTERNAL=TRUE, COLUMN_STATS_ACCURATE={"BASIC_STATS":"true","COLUMN_STATS":{"i":"true","j":"true"}}, numFiles=0, TRANSLATED_TO_EXTERNAL=TRUE, bucketing_version=2, numFilesErasureCoded=0}, viewOriginalText:null, viewExpandedText:null, tableType:EXTERNAL_TABLE, privileges:PrincipalPrivilegeSet(userPrivileges:{vgarg=[PrivilegeGrantInfo(privilege:INSERT, createTime:-1, grantor:vgarg, grantorType:USER, grantOption:true), PrivilegeGrantInfo(privilege:SELECT, createTime:-1, grantor:vgarg, grantorType:USER, grantOption:true), PrivilegeGrantInfo(privilege:UPDATE, createTime:-1, grantor:vgarg, grantorType:USER, grantOption:true), PrivilegeGrantInfo(privilege:DELETE, createTime:-1, grantor:vgarg, grantorType:USER, grantOption:true)]}, groupPrivileges:null, rolePrivileges:null), temporary:false, catName:hive, ownerType:USER) {code} > HMS Translation: HIVE-22189 too strict with location for EXTERNAL tables > ------------------------------------------------------------------------ > > Key: HIVE-22342 > URL: https://issues.apache.org/jira/browse/HIVE-22342 > Project: Hive > Issue Type: Sub-task > Components: Hive > Affects Versions: 4.0.0 > Reporter: Naveen Gangam > Assignee: Naveen Gangam > Priority: Major > Fix For: 4.0.0 > > Attachments: HIVE-22342.2.patch, HIVE-22342.3.patch, HIVE-22342.patch > > > HIVE-22189 restricts EXTERNAL tables being created to be restricted to the > EXTERNAL_WAREHOUSE_DIR. This might be too strict as any other location should > be allowed as long as the location is outside the MANAGED warehouse directory. -- This message was sent by Atlassian Jira (v8.3.4#803005)