Skip to content

Do not consume self in Writer Builders #1753

@CTTY

Description

@CTTY

Is your feature request related to a problem or challenge?

As mentioned here: #1735 (comment)

Currently IcebergWriterBuilder, RollingFileWriterBuilder, and FileWriterBuilder all have build(self) and will consume itself when building the writer.

This will force users to clone the builders a lot if they want to use the same configuration for multiple writers.

let writer1 = builder.clone().build();
let writer2 = builder.clone().build();
...  

Describe the solution you'd like

Change the builders to have build(&self) so users don't have to clone the builders before building.

Note existing builders use async_trait, so using &self, will probably need more trait bound.

Willingness to contribute

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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