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

Permissiveness in schema namespaces for rust SDK?

    XMLWordPrintableJSON

Details

    Description

      We have an Avro schema registry that has schema with hyphens in some of the namespaces. These schema were created by our Debezium connectors. We have Python consumers that are able to use them without an issue, but we're trying to write a consumer in Rust and it appears that the Avro SDK for rust doesn't support this permissiveness.

       

      Here's an example of one of the schema created by our Debezium connectors: 

       

      {
        "type": "record",
        "name": "Envelope",
        "namespace": "debezium.example-connector-20231005.database.my_table",
        "fields": [
          {
            "name": "before",
            "type": [
              "null",
              {
                "type": "record",
                "name": "Value",
                "fields": [
                  {
                    "name": "id",
                    "type": "int"
                  },
                  {
                    "name": "uid",
                    "type": {
                      "type": "long",
                      "connect.default": 0
                    },
                    "default": 0
                  },
      ...
      

       

      If that schema is allowed in our Avro Schema Registry I would think that it should be allowed by any consumer trying to use it. 

       

      I opened an [issue in the rust schema converter crate's repository|https://github.com/gklijs/schema_registry_converter/issues/100], and it appears that the problem is in the Avro SDK. 

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              jslusher Jon Slusher
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 1h 10m
                  1h 10m