private void validatePropertiesAlreadyExist(ConversionFormats targetFormat, Map<String, String> originalParameters)
      throws SemanticException {
    boolean needsMigration = false;
    for (Map.Entry<String, String> entry : targetFormat.properties().entrySet()) {
      String originalParam = originalParameters.get(entry.getKey());
      if (originalParam == null || !originalParam.equalsIgnoreCase(entry.getValue())) {
        needsMigration = true;
        break;
      }
    }

    if (!needsMigration) {
      throw new SemanticException("Can not convert table to " + targetFormat + " ,Table is already of that format");
    }
  }
Operation process of ALTER TABLE ... CONVERT command
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/convert/AlterTableConvertOperation.java