Skip to content

Improve parquet ArrayReaderBuilder tests #9921

@alamb

Description

@alamb

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions