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

Support logical types in Rust Schema Compatibility checks

    XMLWordPrintableJSON

Details

    Description

      The schema compatibility check does not support logical types in the schema.

       

      E.g. even comparing

      "name":"test",
        "type":{
          "type":"int",
          "logicalType":"date"
        }
      }

      with itself will fail compatibility check with an Inconclusive compatibility error.

       

      It'd be great if logical types could be supported.

       

      I have a fix that adds support for most logical types from the docs available here: https://github.com/Panaetius/avro/tree/add-rust-logical-type-compatibility

      This does not support custom logical types.

      This does not support Duration fixed type.

      Note that this considers e.g. Int and Date to be compatible, the spec doesn't seem to define this properly but does mention that logical types are there to change a type without it being a breaking change, so I opted for making them compatible.

       

      {{Linked PR: https://github.com/apache/avro/pull/2728 }}

       

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              panaetius Ralf Grubenmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h