@SuppressWarnings("unchecked")
  private <T> T executeWithArray(Query query, Object[] params, String sql, int limit) throws MetaException {
    return MetastoreDirectSqlUtils.executeWithArray(query, params, sql, limit);
  }
The common query part for table and partition stats
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java