Skip to content

feat: Report completed scan metrics - #3736

Draft
DerGut wants to merge 5 commits into
apache:mainfrom
DerGut:completed-scan-reports
Draft

DerGut wants to merge 5 commits into
apache:mainfrom
DerGut:completed-scan-reports

Conversation

@DerGut

@DerGut DerGut commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Works toward #1466.

flowchart LR
    A["#3709: Reporter API"] --> C["This PR: Scan reporting"]
    B["#3732: Planning counters"] --> C
    C --> D["Follow-ups"]

    click A href "https://github.com/apache/iceberg-rust/pull/3709" _blank
    click B href "https://github.com/apache/iceberg-rust/pull/3732" _blank
Loading

What changes are included in this PR?

Connects the scan counters from #3732 to the reporter API from #3709. Applications can configure a reporter per table or override it per scan.

Reports are submitted asynchronously after normal or COW planning reaches clean EOF. Planning doesn't wait for delivery.

Reporting is opt-in. Partial/failed scans and Java-compatible projection semantics (see PR) require follow-up work.

Are these changes tested?

I extended the metrics counting harness that compares Java's results with iceberg-rust's results to actually exercise the reporter and report completion logic -> updated harness.

This is also running in our infra.

AI Disclosure

AI assisted implementation and testing. Review should focus on completion timing and projection semantics.

Expose the reporter contract and read-only scan report types independently
from scan metric collection and delivery.
Instrument normal and copy-on-write planning with private, invocation-scoped
manifest, data-file, delete-file and deletion-vector counters. Count repeated
delete attachments separately from indexed deletes and use DV content sizes
for attached bytes. Cover pruning, empty/error paths and independent calls.

Production collects and discards these counters until a reporting-integration
change consumes them using the result types introduced by PR apache#3709.
PlanningCounts is a test-only assertion snapshot; production integration can
construct the public result types directly. Duration and stable finalization
after early termination remain follow-up work.
Submit operation-scoped reports asynchronously after clean stream exhaustion, with table-level configuration and scan overrides. Preserve stream items and errors, and omit reports for failed or abandoned plans.

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