dengzhhu653 commented on code in PR #3599:
URL: https://github.com/apache/hive/pull/3599#discussion_r1439239756


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java:
##########
@@ -1822,8 +1907,13 @@ public boolean dropPartition(String dbName, String 
tableName, String partName, b
   @Override
   public boolean dropPartition(String catName, String db_name, String 
tbl_name, String name,
                                boolean deleteData) throws TException {
-    return 
client.drop_partition_by_name_with_environment_context(prependCatalogToDbName(
-        catName, db_name, conf), tbl_name, name, deleteData, null);
+    DropPartitionRequest dropPartitionReq = new DropPartitionRequest();
+    dropPartitionReq.setDbName(db_name);
+    dropPartitionReq.setTblName(tbl_name);
+    dropPartitionReq.setCatName(catName);
+    dropPartitionReq.setPartName(name);
+    dropPartitionReq.setDeleteData(deleteData);
+    return client.drop_partition_by_name_req(dropPartitionReq);

Review Comment:
   for the `drop_partition_by_name_req` and `drop_partition_req`, I would 
prefer to add only `drop_partition_req` for both purposes, Let HMSHandler check 
if the client sets the partition name or partition vals, the same to 
`append_partition_by_name_req` and `append_partition_req`



##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java:
##########
@@ -1822,8 +1907,13 @@ public boolean dropPartition(String dbName, String 
tableName, String partName, b
   @Override
   public boolean dropPartition(String catName, String db_name, String 
tbl_name, String name,
                                boolean deleteData) throws TException {
-    return 
client.drop_partition_by_name_with_environment_context(prependCatalogToDbName(
-        catName, db_name, conf), tbl_name, name, deleteData, null);
+    DropPartitionRequest dropPartitionReq = new DropPartitionRequest();
+    dropPartitionReq.setDbName(db_name);
+    dropPartitionReq.setTblName(tbl_name);
+    dropPartitionReq.setCatName(catName);
+    dropPartitionReq.setPartName(name);
+    dropPartitionReq.setDeleteData(deleteData);
+    return client.drop_partition_by_name_req(dropPartitionReq);

Review Comment:
   for the `drop_partition_by_name_req` and `drop_partition_req`, I would 
prefer to add only `drop_partition_req` for both purposes, let HMSHandler check 
if the client sets the partition name or partition vals, the same to 
`append_partition_by_name_req` and `append_partition_req`



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