As an API suggestion (maybe for another PR, not required):
I would personally find this much easier to understand if the fields were named so I didn't have to refer to make_int32_page_reader to figure out what&[0, 1, 2, 3, 1] and &[0, 1, 1, 1, 1] meant.
Perhaps we could do this with an builder in the test. Something like this perhaps:
let array_reader_1 = TestArrayReaderBuilder::new()
.with_non_null_i32_values(&[4]) // <-- this is especially non obvous if you are used to normal Arrow arrays
.with_def_levels(&[0, 1, 2, 3, 1])
.with_rep_levels(&[0, 1, 1, 1, 1])
.with_max_def_level(3)
.with_max_rep_level(1)
.build()
Originally posted by @alamb in #9847 (comment)
As an API suggestion (maybe for another PR, not required):
I would personally find this much easier to understand if the fields were named so I didn't have to refer to
make_int32_page_readerto figure out what&[0, 1, 2, 3, 1]and&[0, 1, 1, 1, 1]meant.Perhaps we could do this with an builder in the test. Something like this perhaps:
Originally posted by @alamb in #9847 (comment)