Commit ff09ec5
authored
feat(datafusion): parallel file scanning with eager task bucketing (#44)
Port of apache#2298 onto the spiceai-0.9.0 fork.
IcebergTableProvider::scan() now plans files eagerly and distributes
FileScanTasks into min(target_partitions, n_files) buckets, one bucket
per DataFusion partition, so file reads are scheduled concurrently
instead of streaming through a single UnknownPartitioning(1) partition.
When the table is identity-partitioned (single spec, supported column
types, partition columns projected) the scan declares Partitioning::Hash
so downstream joins/aggregates can skip a RepartitionExec.
- TableScan::to_arrow_from_tasks: replay pre-collected FileScanTasks
through the Arrow reader; preserves the spice fork's ArrowReaderBuilder
(file_io, runtime) signature and row-selection config.
- IcebergTableScan gains new_with_tasks (eager) alongside new (lazy,
used by IcebergStaticTableProvider); execute(i) streams buckets[i].
Constructors made pub; with_new_children now errors on children.
- New table/bucketing.rs: identity-hash bucketing via
REPARTITION_RANDOM_STATE + create_hashes, fallback to data_file_path.
- Spice limit pushdown preserved: with_limit threaded into the planning
builder and build_table_scan.
- Drop the unused convert_filters_to_predicate re-export.1 parent a24ad5d commit ff09ec5
9 files changed
Lines changed: 867 additions & 93 deletions
File tree
- crates
- iceberg/src/scan
- integrations/datafusion
- src
- physical_plan
- table
- tests
- sqllogictest/testdata/slts/df_test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
445 | 460 | | |
446 | 461 | | |
447 | 462 | | |
| |||
451 | 466 | | |
452 | 467 | | |
453 | 468 | | |
454 | | - | |
| 469 | + | |
455 | 470 | | |
456 | 471 | | |
457 | 472 | | |
| |||
0 commit comments