You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2014/09/04 16:58:20 UTC
svn commit: r1622493 -
/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
Author: hashutosh
Date: Thu Sep 4 14:58:20 2014
New Revision: 1622493
URL: http://svn.apache.org/r1622493
Log:
HIVE-7949 : Create table LIKE command doesn't set new owner (Pala M Muthaia via Ashutosh Chauhan)
Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java?rev=1622493&r1=1622492&r2=1622493&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Thu Sep 4 14:58:20 2014
@@ -4017,6 +4017,9 @@ public class DDLTask extends Task<DDLWor
tbl.setDbName(names[0]);
tbl.setTableName(names[1]);
+ // using old table object, hence reset the owner to current user for new table.
+ tbl.setOwner(SessionState.getUserFromAuthenticator());
+
if (crtTbl.getLocation() != null) {
tbl.setDataLocation(new Path(crtTbl.getLocation()));
} else {