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.