code: public static Schema merge(Schema left, Schema right) {
      Schema merged = mergeOnly(left, right);
      IncompatibleSchemaException.check(merged != null,
          "Cannot merge %s and %s", left, right);
      return merged;
    }
docs: Merges two {@link Schema} instances if they are compatible.
  <p>
  Two schemas are incompatible if:
  <ul>
  <li>The {@link Schema.Type} does not match.</li>
  <li>For record schemas, the record name does not match</li>
  <li>For enum schemas, the enum name does not match</li>
  </ul>
  <p>
  Map value and array element types will use unions if necessary, and union
  schemas are merged recursively.
  
  @param left a {@code Schema}
  @param right a {@code Schema}
  @return a merged {@code Schema}
  @throws IncompatibleSchemaException if the schemas are not compatible