public List<String> listPackages(ListPackageRequest request) {
    boolean committed = false;
    Query query = null;
    final String catName = normalizeIdentifier(request.getCatName());
    final String dbName = request.isSetDbName() ? normalizeIdentifier(request.getDbName()) : null;
    List<String> names;
    try {
      openTransaction();
      if (request.isSetDbName()) {
        query = pm.newQuery("SELECT name FROM org.apache.hadoop.hive.metastore.model.MPackage " +
                "WHERE database.catalogName == catName && database.name == db");
        query.declareParameters("java.lang.String catName, java.lang.String db");
        query.setResult("name");
        names = new ArrayList<>((Collection<String>) query.execute(catName, dbName));
      } else {
        query = pm.newQuery("SELECT name FROM org.apache.hadoop.hive.metastore.model.MPackage " +
                "WHERE database.catalogName == catName");
        query.declareParameters("java.lang.String catName");
        query.setResult("name");
        names = new ArrayList<>((Collection<String>) query.execute(catName));
      }
      committed = commitTransaction();
    } finally {
      rollbackAndCleanup(committed, query);
    }
    return names;
  }
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