@Override
        public List<Void> run(List<String> input) throws Exception {
          Query query = pm.newQuery(MPartitionColumnStatistics.class);
          addQueryAfterUse(query);
          String filter;
          String parameters;
          if (colNames != null && !colNames.isEmpty()) {
            filter = "t1.contains(partition.partitionName) && partition.table.database.name == t2 && partition.table.tableName == t3 && "
                + "t4.contains(colName) && partition.table.database.catalogName == t5" + (engine != null ? " && engine == t6" : "");
            parameters = "java.util.Collection t1, java.lang.String t2, java.lang.String t3, "
                + "java.util.Collection t4, java.lang.String t5" + (engine != null ? ", java.lang.String t6" : "");
          } else {
            filter = "t1.contains(partition.partitionName) && partition.table.database.name == t2 && partition.table.tableName == t3 && " +
                "partition.table.database.catalogName == t4" + (engine != null ? " && engine == t5" : "");
            parameters = "java.util.Collection t1, java.lang.String t2, java.lang.String t3, java.lang.String t4" + (engine != null ? ", java.lang.String t5" : "");
          }
          query.setFilter(filter);
          query.declareParameters(parameters);
          List<Object> params = new ArrayList<>();
          params.add(input);
          params.add(normalizeIdentifier(database));
          params.add(normalizeIdentifier(tableName));
          if (colNames != null && !colNames.isEmpty()) {
            List<String> normalizedColNames = new ArrayList<>();
            for (String colName : colNames){
              // trim the extra spaces, and change to lowercase
              normalizedColNames.add(normalizeIdentifier(colName));
            }
            params.add(normalizedColNames);
          }
          params.add(catalog);
          if (engine != null) {
            params.add(engine);
          }
          List<MPartitionColumnStatistics> mStatsObjColl =
              (List<MPartitionColumnStatistics>) query.executeWithArray(params.toArray());
          pm.retrieveAll(mStatsObjColl);
          if (mStatsObjColl != null) {
            pm.deletePersistentAll(mStatsObjColl);
          } else {
            throw new NoSuchObjectException("partition stats doesn't exist for db=" + dbName + " table="
                + tableName + " col=" + String.join(", ", colNames) + " partNames=" + String.join(", ", input));
          }
          return null;
        }
Get partition's column stats

@return Map of column name and its stats
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java