public AggrStats getAggrColStatsFor(Table tbl, 
      List<String> colNames, List<String> partName, boolean checkTransactional) {
    
    PerfLogger perfLogger = SessionState.getPerfLogger();
    perfLogger.perfLogBegin(CLASS_NAME, PerfLogger.HIVE_GET_AGGR_COL_STATS);
    
    String writeIdList = null;
    try {
      if (tbl.isNonNative() && tbl.getStorageHandler().canProvideColStatistics(tbl)) {
        return tbl.getStorageHandler().getAggrColStatsFor(tbl, colNames, partName);
      }
      if (checkTransactional) {
        AcidUtils.TableSnapshot tableSnapshot = AcidUtils.getTableSnapshot(conf, tbl);
        writeIdList = tableSnapshot != null ? tableSnapshot.getValidWriteIdList() : null;
      }
      return getMSC().getAggrColStatsFor(tbl.getDbName(), tbl.getTableName(), colNames, partName, 
          Constants.HIVE_ENGINE, writeIdList);
    } catch (Exception e) {
      LOG.debug("Failed getAggrColStatsFor", e);
      return new AggrStats(new ArrayList<>(),0);
    } finally {
      perfLogger.perfLogEnd(CLASS_NAME, PerfLogger.HIVE_GET_AGGR_COL_STATS, "HS2-cache");
    }
  }
@return the metastore client for the current thread
@throws MetaException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java