You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ng...@apache.org on 2019/08/15 01:02:49 UTC

[hive] branch master updated: HIVE-22109: Hive.renamePartition expects catalog name to be set (Naveen Gangam, reviewed by Thejas Nair)

This is an automated email from the ASF dual-hosted git repository.

ngangam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new f9bd589  HIVE-22109: Hive.renamePartition expects catalog name to be set (Naveen Gangam, reviewed by Thejas Nair)
f9bd589 is described below

commit f9bd589f601e3b0bce668de0d737979284bd6150
Author: Naveen Gangam <ng...@apache.org>
AuthorDate: Wed Aug 14 21:02:36 2019 -0400

    HIVE-22109: Hive.renamePartition expects catalog name to be set (Naveen Gangam, reviewed by Thejas Nair)
---
 ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index 21b1ef6..a958657 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -956,7 +956,8 @@ public class Hive {
         }
       }
 
-      getMSC().renamePartition(tbl.getCatName(), tbl.getDbName(), tbl.getTableName(), pvals,
+      String catName = (tbl.getCatalogName() != null) ? tbl.getCatalogName() : getDefaultCatalog(conf);
+      getMSC().renamePartition(catName, tbl.getDbName(), tbl.getTableName(), pvals,
           newPart.getTPartition(), validWriteIds);
 
     } catch (InvalidOperationException e){