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

Ability to perform semantic equality check for two schemas

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • java
    • None

    Description

      I would like to check if two schemas are equivalent. For instance:

      {{

      {"type":"record","name":"Person","fields":[\{"name":"name","type":"string"}

      ,{"name":"age","type":"int"}]}}}

      and

      {{

      {"type":"record","name":"Person","fields":[\{"name":"age","type":"int"}

      ,{"name":"name","type":"string"}]}}}

      can be considered semantically equivalent since the record has the same set of fields only just reordered in the declaration.

      If I do schema1.equals(schema2) for the above, the Avro Java library will say false. Would it be reasonable to add an "equivalence" method to detect such cases?

      Attachments

        Activity

          People

            Unassigned Unassigned
            swaranga Swaranga Sarma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: