Commit b8fc79d
authored
feat(datafusion): parallel file scanning with eager task bucketing (#43)
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 b69ab70 commit b8fc79d
11 files changed
Lines changed: 868 additions & 95 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 | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
475 | 490 | | |
476 | 491 | | |
477 | 492 | | |
| |||
484 | 499 | | |
485 | 500 | | |
486 | 501 | | |
487 | | - | |
| 502 | + | |
488 | 503 | | |
489 | 504 | | |
490 | 505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
0 commit comments