You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Single File Per ParquetExec, AvroExec, etc... #2293
Following on from #2292 and #2291 it should be possible to pull the multi-file handling out of each individual file operator, and delegate it to the physical plan. As described in #2079 this will greatly simplify the implementations, whilst also hiding fewer details from the physical plan.
Describe the solution you'd like
Currently a FileScanConfig would result ListingTable::scan generating a physical plan that looks something like
Whilst this is more complex, it results in less complexity in the file format operators, and should hopefully lead to less bugs due to things like #2170 or #2000
Do you mean PartitionedFile for File, but removing the partition_values field?
pubstructPartitionedFile{/// Path for the file (e.g. URL, filesystem path, etc)pubfile_meta:FileMeta,/// Values of partition columns to be appended to each rowpubpartition_values:Vec<ScalarValue>,/// An optional file range for a more fine-grained parallel executionpubrange:Option<FileRange>,}
Another question: regarding we do a one-to-one mapping between Spark physical plan and DataFusion physical plan, and serde the plan with proto, is this possible we do this Original ParquetExec -> UnionExec(SchemaAdapterExec(New ParquetExec)) in ParquetExec's try_new method or somewhere related place in the physical plan?
Do you mean PartitionedFile for File, but removing the partition_values field?
Yes, although removing the partition_values is likely follow up work
in ParquetExec's try_new method or somewhere related place in the physical plan?
I would rather keep the translation logic out of the file format specific operators, but having a free function that can be called by ListingTable and potentially other things, such as your Spark translation layer, seems perfectly sensible to me. I just care about reducing the amount of smarts in the individual file format specific operators 😄
having a free function that can be called by ListingTable and potentially other things, such as your Spark translation layer, seems perfectly sensible to me
This sounds like a great idea. The serial file processing in ParquetExec is currently a pretty nasty bottleneck for queries over large numbers of parquet files.
Activity
yjshen commentedon Apr 21, 2022
Do you mean
PartitionedFilefor File, but removing thepartition_valuesfield?Another question: regarding we do a one-to-one mapping between Spark physical plan and DataFusion physical plan, and serde the plan with proto, is this possible we do this
Original ParquetExec -> UnionExec(SchemaAdapterExec(New ParquetExec))inParquetExec's try_new method or somewhere related place in the physical plan?tustvold commentedon Apr 21, 2022
Yes, although removing the partition_values is likely follow up work
I would rather keep the translation logic out of the file format specific operators, but having a free function that can be called by
ListingTableand potentially other things, such as your Spark translation layer, seems perfectly sensible to me. I just care about reducing the amount of smarts in the individual file format specific operators 😄yjshen commentedon Apr 21, 2022
Sounds great!
thinkharderdev commentedon Apr 25, 2022
This sounds like a great idea. The serial file processing in
ParquetExecis currently a pretty nasty bottleneck for queries over large numbers of parquet files.alamb commentedon Oct 15, 2025
I believe this was completed in the great
DataSourceextraction, so closing this outhttps://docs.rs/datafusion/latest/datafusion/datasource/source/trait.DataSource.html