private static void addStringStats(ColumnStatisticsData statistics, Map<String, Object> result) {
    if (statistics.getStringStats().isSetNumNulls()) {
      result.put(COLUMN_NUM_NULLS, statistics.getStringStats().getNumNulls());
    }
    if (statistics.getStringStats().isSetNumDVs()) {
      result.put(COLUMN_DISTINCT_COUNT, statistics.getStringStats().getNumDVs());
    }
    if (statistics.getStringStats().isSetAvgColLen()) {
      result.put(COLUMN_AVG_LENGTH, statistics.getStringStats().getAvgColLen());
    }
    if (statistics.getStringStats().isSetMaxColLen()) {
      result.put(COLUMN_MAX_LENGTH, statistics.getStringStats().getMaxColLen());
    }
  }
Formats DESC TABLE results to json format.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/JsonDescTableFormatter.java