Skip to content

Fix clippy lint for the number of arguments to CsvExec::new() #11565

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

As of #11533 ❤️ from @connec the CsvExec::new() function gets marked by clippy as having too many arguments

We have suppressed the clippy error for now, but that is not a good long term solution

Describe the solution you'd like

I think we should fix the clippy lint for real rather than just suppressing it

Describe alternatives you've considered

I would personally suggest a builder pattern such as the following as it is easy to document and extend in the future without breaking API changes

let csv_exec = CsvExec::builder()
  .with_has_header(true)
  .with_newlines_in_values(true)
  ...
  .build()?

I think we could follow the model of https://docs.rs/datafusion/latest/datafusion/datasource/physical_plan/parquet/struct.ParquetExecBuilder.html

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions