Skip to content

arrow-avro cannot flush records with no fields #10770

Closed

Description

@sqd

Describe the bug

An Avro record with no fields is legal, and encodes to zero bytes. The reader accepts such a schema and decodes its (empty) bytes fine, but fails at flush:

Invalid argument error: use StructArray::try_new_with_length or
StructArray::new_empty_fields to create a struct array with no
fields so that the length can be set correctly

Decoder::Record flushes through StructArray::try_new, which infers its length from the first child array, but a zero-field record has no child array.

To Reproduce

See associated PR

Expected behavior

No response

Additional context

No response

Activity

  1. added theissue type on Aug 20, 2026
  2. added
    bug
    on Aug 20, 2026
  3. added a commit that references this issue on Sep 2, 2026
    bd4d32b
  4. added 3 commits that reference this issue on Sep 18, 2026
    ff45ca3
    c9d4eb7
    6e9fae8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions