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

Avro IDL does not allow creation of avro.java.string subtype

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.10.2
    • 1.11.1
    • java, tools
    • Java 8, Windows, macOS, Confluent Platform 5.5.1

    Description

       

      When using a Java application that has class files generated from an avsc file via the Avro Maven plugin along with the 

      <stringType>String</stringType>

      switch set, serialization of records of the type string such as

       

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

      will fail. Changing the type to include an "avro.java.string" detail such as

       

      "name": "eventType",
                  "type": {
                    "avro.java.string": "String",
                    "type": "string"
                  }
      

      will succeed.

       

      It is not possible to create this "avro.java.string": "String" detail via the Avro IDL language. The schema creator must first create the avsc file then manually update all of the "type":"string" fields.

      See also this link.

       

       

      Attachments

        Issue Links

          Activity

            People

              opwvhk Oscar Westra van Holthe - Kind
              TDimo Timothy Dimo
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 20m
                  20m