Skip to content

Support roundtrip ListView in parquet arrow writer #9344

@Jefffrey

Description

@Jefffrey

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Support writing/reading listview columns in parquet

Describe the solution you'd like

Example unit test that should pass:

#[test]
fn arrow_writer_list_view() {
    let list_field = Arc::new(Field::new_list_field(DataType::Int32, false));
    let schema = Schema::new(vec![Field::new(
        "a",
        DataType::ListView(list_field.clone()),
        true,
    )]);

    //  [[1], [2, 3], null, [4, 5, 6], [7, 8, 9, 10]]
    let a = ListViewArray::new(
        list_field,
        vec![0, 1, 0, 3, 6].into(),
        vec![1, 2, 0, 3, 4].into(),
        Arc::new(Int32Array::from(vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10])),
        Some(vec![true, true, false, true, true].into()),
    );

    let batch = RecordBatch::try_new(Arc::new(schema), vec![Arc::new(a)]).unwrap();

    roundtrip(batch, None);
}

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Labels

enhancementAny new improvement worthy of a entry in the changelog

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