Skip to content

[Avro] Decoder flush panics for map whose value field contains metadata #8270

@yongkyunlee

Description

@yongkyunlee

Describe the bug

Decoder flush panics when the value field of a map type contains metadata (e.g. enum type)

To Reproduce

When we generate avro data with a map field whose value type is enum, the decoder panics at flush with an error like below

thread 'reader::record::tests::test_map_entries_with_enum_value' panicked at arrow-array/src/array/map_array.rs:132:64:
called `Result::unwrap()` on an `Err` value: InvalidArgumentError("MapArray expected data type Struct(key Utf8, value Dictionary(Int32, Utf8)) got Struct(key Utf8, value Dictionary(Int32, Utf8)) for \"entries\"")

Expected behavior

Flush should be successful with any valid value field type of a map.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions