@Override
  public int execute() throws Exception {
    if (!DDLUtils.allowOperationInReplicationScope(context.getDb(), desc.getDbTableName(), null,
        desc.getReplicationSpec())) {
      // no alter, the table is missing either due to drop/rename which follows the alter.
      // or the existing table is newer than our update.
      LOG.debug("DDLTask: Alter Table is skipped as table {} is newer than update", desc.getDbTableName());
      return 0;
    }

    try {
      context.getDb().dropConstraint(desc.getTableName().getDb(), desc.getTableName().getTable(),
          desc.getConstraintName());
    } catch (NoSuchObjectException e) {
      throw new HiveException(e);
    }

    return 0;
  }
Operation process of dropping a new constraint.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/constraint/drop/AlterTableDropConstraintOperation.java