Skip to content

feat: represent eager Iceberg scans with FileScanConfig - #801

Draft
alexanderbianchi wants to merge 3 commits into
alex.bianchi/iceberg-selected-column-bytesfrom
codex/iceberg-file-scan-config
Draft

alexanderbianchi wants to merge 3 commits into
alex.bianchi/iceberg-selected-column-bytesfrom
codex/iceberg-file-scan-config

Conversation

@alexanderbianchi

Copy link
Copy Markdown
Collaborator

Eager scans as standard file scans

This draft explores an alternative to #799: one Iceberg FileScanTask is one PartitionedFile in a DataFusion FileScanConfig. The file entry exposes path and size, while its typed IcebergFileTask extension retains the complete Iceberg descriptor, including deletes and residual predicates.

Before:
  eager planning -> retained files behind a feed
  task plan      -> feed ID
  execution      -> file descriptors arrive through feed messages

This draft:
  eager planning -> FileScanConfig.file_groups
  task plan      -> assigned file groups + Iceberg task metadata
  execution      -> IcebergFileSource opens each task using iceberg-rust

The existing routing callback can inspect the task's file groups before choosing a worker. There is no ScanInput enum, separate AssignedFiles grouping, second routing plan, or core DFD API change. Lazy scans retain their existing feed-backed source.

What remains Iceberg-specific

  • Manifest planning, pruning, and selected-file statistics.
  • Round-robin/greedy assignment to task-local file groups.
  • An Iceberg file opener that retains the existing reader's delete and schema semantics.
  • Codec support for per-file metadata: DataFusion's scan-config codec is reused, but it does not serialize arbitrary file extensions.
  • Whole-task assignment; automatic byte-range splitting is disabled.

Planning statistics are transferred to the initial file scan. Task variants use unknown statistics rather than incorrectly reusing whole-scan aggregates.

Questions this experiment exposes

  • DataFusion now schedules individual file opens. The Iceberg reader receives one task per open, so iceberg.data_file_concurrency_limit no longer controls concurrency across eager files. No performance claim is made.
  • The opener still uses Iceberg FileIO. The config's local object-store URL is an unused placeholder; storage-aware routing should use the extension's original complete URI.
  • Assignment runs synchronously in DFD's scale-up callback.
  • Re-execution follows DataFusion's reset_state() contract for file scans.
  • Coordinators and workers must be upgraded together for the new eager payload.

Stacked on #789, independently of #797 and #799, so the alternatives remain reviewable separately.

Validation

  • Full Iceberg suite: 70 tests and 1 doctest passed.
  • Formatting and Clippy (all targets, warnings denied) passed.
  • Routing tests compare full serialized task descriptors before/after codec round-trips and execute both assignment policies, isolated UNION branches, and reset scans.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant