CREATE.. TABLE...LIKE should propagate current owner:
-----------------------------------------------------

                 Key: HIVE-2268
                 URL: https://issues.apache.org/jira/browse/HIVE-2268
             Project: Hive
          Issue Type: Bug
          Components: Metastore
    Affects Versions: 0.7.1, 0.7.0, 0.8.0
            Reporter: Esteban Gutierrez


-- alice creates table 
CREATE EXTERNAL TABLE foo(bar double)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
STORED AS TEXTFILE LOCATION '/user/alice/foo';

-- table owner is alice as expected
hive> DESCRIBE EXTENDED foo;
OK
bar     double  
                 
Detailed Table Information      Table(tableName:foo, dbName:default, 
{color:red} owner:alice {color}, createTime:1309996190, lastAccessTime:0, 
retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:bar, type:double, 
comment:null)], location:hdfs://localhost/user/alice/foo, 
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=,, field.delim=,, line.delim=       
}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], 
parameters:{EXTERNAL=TRUE, transient_lastDdlTime=1309996190}, 
viewOriginalText:null, viewExpandedText:null, tableType:EXTERNAL_TABLE)      


-- bob calls CREATE..TABLE..LIKE
CREATE TABLE foo_like LIKE foo;

-- bob created a new table using like but the owner stills alice
-- but the expected is owner:bob
hive>  DESCRIBE EXTENDED foo_like;

OK
bar     double  
                 
Detailed Table Information      Table(tableName:foo_like, dbName:default, 
{color:red} owner:alice {color}, createTime:1309996554, lastAccessTime:0, 
retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:bar, type:double, 
comment:null)], location:hdfs://localhost/user/hive/warehouse/foo_like, 
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=,, field.delim=,, line.delim=  
}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], 
parameters:{transient_lastDdlTime=1309996554}, viewOriginalText:null, 
viewExpandedText:null, tableType:MANAGED_TABLE)



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to