public String getAlterTableStmtPrimaryKeyConstraint(PrimaryKeyInfo pr) {
    if (!PrimaryKeyInfo.isNotEmpty(pr)) {
      return null;
    }
    ST command = new ST(ALTER_TABLE_ADD_PRIMARY_KEY);
    command.add(TABLE_NAME, unparseIdentifier(pr.getTableName()));
    command.add(DATABASE_NAME, unparseIdentifier(pr.getDatabaseName()));
    command.add(CONSTRAINT_NAME, unparseIdentifier(pr.getConstraintName()));
    command.add(COL_NAMES, unparseListOfIdentifiersAndJoin(pr.getColNames().values(), ","));
    command.add(ENABLE, pr.getEnable());
    command.add(VALIDATE, pr.getValidate());
    command.add(RELY, pr.getRely());
    return command.render();
  }
Parses the basic table statistics for the given table.

@param tbl
@return Returns the alter table .... update statistics for table
ql/src/java/org/apache/hadoop/hive/ql/exec/DDLPlanUtils.java