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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -10330,6 +10330,46 @@ public boolean deletePartitionColumnStatistics(String 
catName, String dbName, St
     return ret;
   }
 
+  public boolean deletePartitionMultiColumnStatistics(String catName, String 
dbName, String tableName,
+                                                 String partName, List<String> 
partVals, List<String> colNames, String engine)
+          throws NoSuchObjectException, MetaException, InvalidObjectException, 
InvalidInputException {
+    boolean ret = false;
+    Query query = null;
+    dbName = org.apache.commons.lang3.StringUtils.defaultString(dbName,
+            Warehouse.DEFAULT_DATABASE_NAME);
+    catName = normalizeIdentifier(catName);
+    if (tableName == null) {
+      throw new InvalidInputException("Table name is null.");
+    }
+    try {
+      openTransaction();
+      MTable mTable = getMTable(catName, dbName, tableName);
+      if (mTable == null) {
+        throw new NoSuchObjectException("Table " + tableName
+                + "  for which stats deletion is requested doesn't exist");
+      }
+      // Note: this does not verify ACID state; called internally when 
removing cols/etc.
+      //       Also called via an unused metastore API that checks for ACID 
tables.
+      MPartition mPartition = getMPartition(catName, dbName, tableName, 
partVals, mTable);
+      if (mPartition == null) {
+        throw new NoSuchObjectException("Partition " + partName
+                + " for which stats deletion is requested doesn't exist");
+      }
+      query = pm.newQuery(MPartitionColumnStatistics.class);
+      if (colNames != null) {
+        for (String colName : colNames){
+          deletePartitionColumnStatistics(catName, dbName, tableName, 
partName, partVals, colName, engine);

Review Comment:
   can we drop all the columns' statistics in a round?



-- 
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-unsubscr...@hive.apache.org

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


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

Reply via email to