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

Arrays of Imported Types in Schema Definition

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.1
    • Component/s: java
    • Labels:
      None

      Description

      Using the maven-plugin we can specify a list of schemas for import which can then be used as dependencies in subsequent schemas. However, this does not work if we want to use an imported type as the item type of an array field in a record. This currently does not work due to the way that the items node of the array field is passed back to the parse method in Schema.java here https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/Schema.java#L1306. The imported type will only be found if the type within the items node is passed to parse as it is for example here https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/Schema.java#L1306 for the union type.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ddukek22 Dillon Dukek
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: