dengzhhu653 commented on code in PR #5578: URL: https://github.com/apache/hive/pull/5578#discussion_r1916287006
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java: ########## @@ -10420,6 +10522,100 @@ public boolean deleteTableColumnStatistics(String catName, String dbName, String return ret; } + @Override + public boolean deleteTableMultiColumnStatistics(String catName, String dbName, String tableName, + 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); + if (tableName == null) { + throw new InvalidInputException("Table name is null."); + } + try { + openTransaction(); + MTable mTable = getMTable(catName, dbName, tableName); + MTableColumnStatistics mStatsObj; + List<MTableColumnStatistics> mStatsObjColl; + if (mTable == null) { + throw new NoSuchObjectException("Table " + + TableName.getQualified(catName, dbName, 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. + query = pm.newQuery(MTableColumnStatistics.class); + String filter; + String parameters; + if (colNames != null) { Review Comment: nit: `colNames != null and !colNames.isEmpty()` -- 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