You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "saihemanth-cloudera (via GitHub)" <gi...@apache.org> on 2023/03/27 06:08:25 UTC

[GitHub] [hive] saihemanth-cloudera commented on a diff in pull request #4123: HIVE-27150: Drop single partition can also support direct sql

saihemanth-cloudera commented on code in PR #4123:
URL: https://github.com/apache/hive/pull/4123#discussion_r1148824344


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -3101,6 +3100,22 @@ public boolean dropPartition(String catName, String dbName, String tableName,
     return success;
   }
 
+  @Override
+  public boolean dropPartition(String catName, String dbName, String tableName, String partName)
+      throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException {
+    boolean success = false;
+    try {
+      openTransaction();
+      dropPartitionsInternal(catName, dbName, tableName, Arrays.asList(partName), true, true);

Review Comment:
   I don't think this would improve the performance by any means. Consider dropping 10k partitions, each partition would have to access same number of tables in the underlying db to update the records, so it makes sense to batch them and implement with direct SQL. But for a single partition since it'll access same number of tables in the DB, I don't think it'll make sense to implement this feature.
   For example, [HIVE-26035](https://issues.apache.org/jira/browse/HIVE-26035) (see the details in the jira) proved that implementing direct SQL actually improved the performance by running against benchmark tests.
   Similarly can you provide any evidence that this patch also has an edge by running those tests? (Probably you might have to add some tests(e.g: dropping 10K+ single partitions).



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org