-
Notifications
You must be signed in to change notification settings - Fork 299
Description
What's the feature are you trying to implement?
As @colinmarc mention in https://apache-iceberg.slack.com/archives/C05HTENMJG4/p1753476472857519 , performance of iceberg-datafusion integration is lower than pure datafusion reading parquet file directly. As mention by @liurenjie1024 , it's caused by iceberg-datafusion integration only use one thread now. This issue propose a design to support parallel scan in iceberg-datafusion integration. And thanks to https://github.com/colinmarc/iceberg-datafusion-benchmarks from @colinmarc let us can dive into the bottleneck!
Row group based parallel scan
This parallel scan is row group based. The basic idea is to prune the file need scan into several group and pack them based on the parallism set by datafusion. The benefit of row group base parallel:
- Parallel scan even in less file scene
- More even distribute the read load after prune some row group in the file, e.g.
let mut selected_row_group_indices = None;
The process can be describe as following:
- 1 is our plan_file now, prune the iceberg metadata and get the FileScanTask finally. It's one data file bind with several delete file related to it.
- 2 We introduce a
GroupPruner
, which can attach the group info at FileScanTask and prune the some group based on predicate. We can implement group pruner for specific file format, e.g.ParquetGroupPruner
to process different format of FileScanTask. - 3 FileScanTask with group info can be split into multilple FileScanTask or merge. Base on the parallesim, we can repartition the FileScanTask into multiple PartitionTask which contain several FileScanTask.
Each partition task return as a RecordBatchStream when we execute using corresponding partition.

Willingness to contribute
Yes