Skip to content

feat: report Iceberg scan files and bytes - #124

Open
alexanderbianchi wants to merge 3 commits into
apache:mainfrom
alexanderbianchi:codex/scan-metrics
Open

alexanderbianchi wants to merge 3 commits into
apache:mainfrom
alexanderbianchi:codex/scan-metrics

Conversation

@alexanderbianchi

@alexanderbianchi alexanderbianchi commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Iceberg scans exposed baseline output metrics, but EXPLAIN ANALYZE could not show how many files the reader started or how many bytes it read. Port the instrumentation from DFD #850 into the shared IcebergDataSource, for eager and lazy task providers.

Add two per-partition metrics:

  • files_opened: file tasks pulled by the reader, including read-ahead for limited scans.
  • bytes_scanned: reader-reported bytes for data and delete files, excluding manifest discovery.

Update byte counts after each completed stream poll, including end of stream when the reader produces no batches.

Extend the existing limit snapshot to report both files and bytes. Keep one additional harness-driven zero-output regression to verify that reader I/O is reported when no rows match.

Validation:

  • The zero-output regression fails without the instrumentation.
  • cargo test --workspace --locked
  • cargo clippy --workspace --locked --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Developed with AI assistance.

alexanderbianchi and others added 2 commits November 19, 2026 19:36
Port the reader instrumentation from datafusion-contrib/datafusion-distributed#850 into the shared IcebergDataSource.

Co-authored-by: Anirudh <[email protected]>
Signed-off-by: alex.bianchi <[email protected]>
Comment thread crates/datafusion/src/read/scan.rs Resolved
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