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

Avro: Schema compatibility/evolution - attribute size change

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.8.2
    • Fix Version/s: None
    • Component/s: spec
    • Labels:
    • Tags:
      avro

      Description

      Let's assume the schema changed from V1 to V2.  Currently, we can't create a merge of the two schema that makes it a compatible for both.  Depending on what size we keep for the specific attribute in the reader schema (the merged), you can read avro files of schema V1 or V2, but not both.  If we keep the higher attribute size value (64) as part of the merged schema, it should allow the read of avro files with lower attribute size value (16)

       

      • V1 schema:

      { "name": "sid", "type": [ "null",

      { "type": "fixed", "name": "SID", "namespace": "com.int.datatype", "doc": "", "size": *64* }

      ], "doc": "", "default": null, "businessLogic": "" }

       

      • V2 schema:

      { "name": "sid", "type": [ "null",

      { "type": "fixed", "name": "SID", "namespace": "com.int.datatype", "doc": "", "size": *16* }

      ], "doc": "", "default": null, "businessLogic": "" }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ashsskum Ashok

              Dates

              • Created:
                Updated:

                Issue deployment