Skip to content

[avro] Bug in resolving avro schema with named type #8045

@yongkyunlee

Description

@yongkyunlee

Describe the bug

There is a bug in arrow-avro's avro to arrow type conversion with type reuse.

To Reproduce

When you try to run make_data_type from the following avro schema with named type reuse, the code panics.

{
  "type": "record",
  "name": "Sample",
  "namespace": "test",
  "fields": [
    {
      "name": "key",
      "type": "string"
    },
    {
      "name": "nested",
      "type": {
        "type": "record",
        "name": "Nested",
        "fields": [
          {
            "name": "nested_int",
            "type": "int"
          }
        ]
      }
    },
    {
      "name": "nestedAgain",
      "type": "Nested"
    },
    {
      "name": "nestedArray",
      "type": {
        "type": "array",
        "items": "Nested"
      }
    },
    {
      "name": "nestedMap",
      "type": {
        "type": "map",
        "values": "Nested"
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow cratebug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions