Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1815

Incompatible schema change not detected when wrapped in a UNION

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.7.7
    • None
    • java
    • None

    Description

      An incompatible schema change is not detected when it is in a UNION and the change is to the value type of a map e.g.

      field

      { "name": "segmentEkv", "type": ["null", {"type": "map", "values": {"type": "map", "values": "string"}}], "default": null},

      changes to

      { "name": "segmentEkv", "type": ["null", {"type": "map", "values": {"type": "array", "items": "int"}}], "default": null},

      The SchemaValidatorBuilder() will pass this as being compatible. Whereas SchemaCompatibility.check_reader_writer_compatibility will return an incompatible result. The problem for me is that the Confluent Schema Registry uses SchemaValidatorBuilder.

      Problem appears to be that while the ResolvingGrammerGenerator correctly marks the field as being an incompatible change, the check for errors on the Symbol object does not descend into the UnionAdjustActionField

      Attachments

        1. AVRO-1815.patch
          5 kB
          Martin Boyle

        Issue Links

          Activity

            People

              Unassigned Unassigned
              martinboyleie Martin Boyle
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: