Skip to content

Empty or null list of struct cannot be written to parquet  #703

@mosyp

Description

@mosyp

Describe the bug
When writing arrow batch with empty or null list struct, it fails with General("Inconsistent length of definition and repetition levels: 0 != 1")

To Reproduce
Write record batch which contain empty or null list of struct. Here's the PR with full repro behaviour #704

Expected behavior
The batch is successfully written

Additional context
WHat I could debug is that this line should fail https://github.com/apache/arrow-rs/blob/master/parquet/src/arrow/levels.rs#L646, because at some point the array_mask becomes empty slice which leads to the Inconsistent length of definition and repetition levels

I feel like this might be somehow connected #594.

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