public void getAlterTableStmtCheckConstraint(CheckConstraint ck, List<String> constraints) {
    if (!CheckConstraint.isNotEmpty(ck)) {
      return;
    }
    Map<String, List<CheckConstraint.CheckConstraintCol>> checkConstraints = ck.getCheckConstraints();
    for (String constraintName : checkConstraints.keySet()) {
      List<CheckConstraintCol> checkConstraintCols = checkConstraints.get(constraintName);
      if (checkConstraintCols != null && checkConstraintCols.size() > 0) {
        for (CheckConstraintCol col : checkConstraintCols) {
          ST command = new ST(ALTER_TABLE_ADD_CHECK_CONSTRAINT);
          command.add(DATABASE_NAME, unparseIdentifier(ck.getDatabaseName()));
          command.add(TABLE_NAME, unparseIdentifier(ck.getTableName()));
          command.add(CONSTRAINT_NAME, unparseIdentifier(constraintName));
          command.add(CHECK_EXPRESSION, col.getCheckExpression());
          command.add(ENABLE, col.getEnable());
          command.add(VALIDATE, col.getValidate());
          command.add(RELY, col.getRely());
          constraints.add(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