public List<String> getAlterTableStmtPartitionStatsColsAll(List<ColumnStatisticsObj> columnStatisticsObjList,
                                                             String tblName,
                                                             String ptName,
                                                             String dbName) {
    List<String> alterTableStmt = new ArrayList<>();
    final Comparator<ColumnStatisticsObj> colNameComparator = Comparator.comparing(ColumnStatisticsObj::getColName);
    columnStatisticsObjList.stream().sorted(colNameComparator).forEach(statisticsObj -> {
      alterTableStmt.add(getAlterTableStmtPartitionColStat(
          statisticsObj.getStatsData(), statisticsObj.getColName(), tblName, ptName, dbName));
      String base64BitVectors = checkBitVectors(statisticsObj.getStatsData());
      if (base64BitVectors != null) {
        ST command = new ST(EXIST_BIT_VECTORS_PARTITIONED);
        command.add(DATABASE_NAME, unparseIdentifier(dbName));
        command.add(TABLE_NAME, unparseIdentifier(tblName));
        command.add(PARTITION_NAME, ptName);
        command.add(COLUMN_NAME, unparseIdentifier(statisticsObj.getColName()));
        command.add(BASE_64_VALUE, base64BitVectors);
        alterTableStmt.add(command.render());
      }
      String base64Histogram = checkHistogram(statisticsObj.getStatsData());
      if (base64Histogram != null) {
        ST command = new ST(EXIST_HISTOGRAM_PARTITIONED);
        command.add(DATABASE_NAME, unparseIdentifier(dbName));
        command.add(TABLE_NAME, unparseIdentifier(tblName));
        command.add(PARTITION_NAME, ptName);
        command.add(COLUMN_NAME, unparseIdentifier(statisticsObj.getColName()));
        command.add(BASE_64_VALUE, base64Histogram);
        alterTableStmt.add(command.render());
      }
    });
    return alterTableStmt;
  }
Parses the ColumnStatistics for all the columns in a given partition and adds the alter table update
statistics command for each column.

@param columnStatisticsObjList
@param tblName
@param ptName
@param dbName
ql/src/java/org/apache/hadoop/hive/ql/exec/DDLPlanUtils.java