private void writeMPartitionColumnStatistics(Table table, Partition partition,
      MPartitionColumnStatistics mStatsObj, MPartitionColumnStatistics oldStats) {
    String catName = mStatsObj.getPartition().getTable().getDatabase().getCatalogName();
    String dbName = mStatsObj.getPartition().getTable().getDatabase().getName();
    String tableName = mStatsObj.getPartition().getTable().getTableName();
    String partName = mStatsObj.getPartition().getPartitionName();
    String colName = mStatsObj.getColName();

    Preconditions.checkState(this.currentTransaction.isActive());

    LOG.info("Updating partition level column statistics for table=" +
        TableName.getQualified(catName, dbName, tableName) +
        " partName=" + partName + " colName=" + colName);

    boolean foundCol = false;
    List<FieldSchema> colList = partition.getSd().getCols();
    for (FieldSchema col : colList) {
      if (col.getName().equals(mStatsObj.getColName())) {
        foundCol = true;
        break;
      }
    }

    if (!foundCol) {
      LOG.warn("Column " + colName + " for which stats gathering is requested doesn't exist.");
    }

    if (oldStats != null) {
      StatObjectConverter.setFieldsIntoOldStats(mStatsObj, oldStats);
    } else {
      pm.makePersistent(mStatsObj);
    }
  }
Add role names of parentRoles and its parents to processedRoles
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java