FileSource
and DataSource
traits require deep copies
#14939
Labels
enhancement
New feature or request
FileSource
and DataSource
traits require deep copies
#14939
Is your feature request related to a problem or challenge?
While working on various upgrade PRs and preparing for the DataFusion 46 release, I have noticed something I would like to change before we release
The
FileSource
andDataSource
traits were introduced in the datasource refactorDataSourceExec
for provided datasources, removeParquetExec
,CsvExec
, etc #14224They have APIs to update the underlying source in a few ways, but the APIs require cloning. For example,
FileSource
looks like this:The only way to implement
with_batch_size
is to (deep) clone the objectdatafusion/datafusion/core/src/datasource/physical_plan/csv.rs
Lines 584 to 588 in 1ae06a4
Describe the solution you'd like
I would like to avoid having to deep clone the object
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: