Skip to content

[Variant] Add ListBuilder::with_value for convenience #7951

@alamb

Description

@alamb

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I find myself annoyed at having to give names to the intermediate object / list builders in examples and tests.

Describe the solution you'd like

I would rather just use a builder style api

Describe alternatives you've considered
For example from

        {
            let mut list = builder.new_list();
            list.append_value("hello");
            list.append_value(42i32);
            list.append_value(true);
            list.append_value(()); // null
            list.append_value(std::f64::consts::PI);
            list.finish();
        }

to

        builder.new_list()
            .with_value("hello")
            .with_value(42i32)
            .with_value(true)
            .with_value(()) // null
            .with_value(std::f64::consts::PI)
            .finish()

Additional context
Related

Metadata

Metadata

Assignees

Labels

enhancementAny new improvement worthy of a entry in the changelogparquetChanges to the parquet crate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions