@Override
  public int execute() {
    try {
      Hive db = getHive();
      return persistColumnStats(db);
    } catch (Exception e) {
      setException(e);
      LOG.info("Failed to persist stats in metastore", e);
      return ReplUtils.handleException(work.isReplication(), e, work.getDumpDirectory(), work.getMetricCollector(),
                                       getName(), conf);
    }
  }
ColumnStatsUpdateTask implementation. For example, ALTER TABLE src_stat
UPDATE STATISTICS for column key SET ('numDVs'='1111','avgColLen'='1.111');
For another example, ALTER TABLE src_stat_part PARTITION(partitionId=100)
UPDATE STATISTICS for column value SET
('maxColLen'='4444','avgColLen'='44.4');
ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsUpdateTask.java