datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Introduce way to customize prefix of multi file outputs

Open DoumanAsh opened this issue 4 weeks ago • 0 comments

Which issue does this PR close?

  • Closes #19261

Rationale for this change

As per issue, this is most simple approach to allow user to have control over file outputs when writing partitioned parquet/csv

I'm not certain if it would be useful for part-{idx} or not as I do not understand code base well enough to see context of where it is used (for my part I'm mostly interested in making sure randomised file names have unique prefix that I can use to identify these files)

What changes are included in this PR?

Introduces new option partitioned_file_prefix_name within ExecutionOptions with default value empty to retain current behavior by default

This option is used to generate prefix of the file name in writes of datasource' and datasource-* crates

Are these changes tested?

I included basic test to illustrate behaviour of partitioned file output

Are there any user-facing changes?

These changes do not change existing behaviour

DoumanAsh avatar Dec 10 '25 14:12 DoumanAsh