feat: task-level input metrics (bytesRead) for Iceberg native scan #4128
Merged
mbutrovich merged 6 commits intoapache:mainfrom Apr 28, 2026
Merged
feat: task-level input metrics (bytesRead) for Iceberg native scan #4128mbutrovich merged 6 commits intoapache:mainfrom
mbutrovich merged 6 commits intoapache:mainfrom
Conversation
andygrove
reviewed
Apr 28, 2026
andygrove
reviewed
Apr 28, 2026
comphead
reviewed
Apr 28, 2026
comphead
reviewed
Apr 28, 2026
comphead
reviewed
Apr 28, 2026
hsiang-c
reviewed
Apr 28, 2026
Contributor
Author
|
Thanks for the feedback @andygrove, @comphead, and @hsiang-c! Hopefully I addressed all comments and clarified in the user guide for Iceberg. |
hsiang-c
reviewed
Apr 28, 2026
hsiang-c
approved these changes
Apr 28, 2026
Contributor
hsiang-c
left a comment
There was a problem hiding this comment.
LGTM, thanks @mbutrovich
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #4002.
Rationale for this change
Iceberg native scans report zero for task-level input metrics (bytesRead, recordsRead) in Spark UI because iceberg-rust reads files entirely in Rust, bypassing Hadoop's Java I/O counters. Upstream iceberg-rust PR apache/iceberg-rust#2349 added
ScanMetricswith a livebytes_readcounter. This PR plumbs that through to Spark.What changes are included in this PR?
a2f067dto1ad4bfd(addsScanResult/ScanMetrics)ArrowReader::read()now returnsScanResult: extract stream and clone metrics handlebytes_scannedCount metric toIcebergScanMetrics, bridge iceberg-rust's liveAtomicU64into the DF metric tree on eachpoll_nextvia delta trackingbytes_scannedSQLMetric toCometIcebergNativeScanExecCometExecRDD.compute()to callreportScanInputMetrics(same pattern as the Parquet path)configured_schemefield fromOpenDalStorageFactory::S3(upstream API change)How are these changes tested?
bytes_scanned > 0assertion to existing "verify all Iceberg planning metrics" testSparkListenerto verifybytesRead > 0,recordsRead == 10000, and cross-checks SQL-levelbytes_scannedmatches task-levelbytesRead