public boolean setPartitionColumnStatistics(
      SetPartitionsStatsRequest request) throws HiveException {
    try {
      ColumnStatistics colStat = request.getColStats().get(0);
      ColumnStatisticsDesc statsDesc = colStat.getStatsDesc();

      // In case of replication, the request already has valid writeId and valid transaction id
      // list obtained from the source. Just use it.
      if (request.getWriteId() <= 0 || request.getValidWriteIdList() == null) {
        Table tbl = getTable(statsDesc.getDbName(), statsDesc.getTableName());
        AcidUtils.TableSnapshot tableSnapshot = AcidUtils.getTableSnapshot(conf, tbl, true);
        request.setValidWriteIdList(tableSnapshot != null ? tableSnapshot.getValidWriteIdList() : null);
        request.setWriteId(tableSnapshot != null ? tableSnapshot.getWriteId() : 0);
      }

      return getMSC().setPartitionColumnStatistics(request);
    } catch (Exception e) {
      LOG.debug("Failed setPartitionColumnStatistics", e);
      throw new HiveException(e);
    }
  }
@return the metastore client for the current thread
@throws MetaException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java